Mercurial > hg > Feedworm
comparison Mapping.py @ 54:b535bce50626
the relationship between feed and its entries can be mapped as lazy -> fewer DB round trips
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 18 May 2010 03:12:00 +0200 |
parents | a8442c3487b5 |
children | 525a52169f60 |
comparison
equal
deleted
inserted
replaced
53:8cca4585eb33 | 54:b535bce50626 |
---|---|
60 metadata.create_all() | 60 metadata.create_all() |
61 | 61 |
62 mapper(FeedEntry, feedEntryTable) | 62 mapper(FeedEntry, feedEntryTable) |
63 mapper(Feed, feedTable, | 63 mapper(Feed, feedTable, |
64 properties = { | 64 properties = { |
65 "entries" : relation(FeedEntry, backref="feed") | 65 "entries" : relation(FeedEntry, backref="feed", lazy=True) |
66 } | 66 } |
67 ) | 67 ) |
68 mapper(Preference, preferencesTable) | 68 mapper(Preference, preferencesTable) |