projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a8d1ef5
)
Make version_group.versions an actual relation with an order_by().
author
Zhorken
<zhorken@gmail.com>
Mon, 6 Dec 2010 22:56:43 +0000
(17:56 -0500)
committer
Zhorken
<zhorken@gmail.com>
Mon, 6 Dec 2010 22:56:43 +0000
(17:56 -0500)
pokedex/db/tables.py
patch
|
blob
|
history
diff --git
a/pokedex/db/tables.py
b/pokedex/db/tables.py
index
958cfb7
..
0e336ce
100644
(file)
--- a/
pokedex/db/tables.py
+++ b/
pokedex/db/tables.py
@@
-1578,9
+1578,10
@@
Type.foreign_names = relation(TypeName, backref='type')
TypeName.language = relation(Language)
TypeName.language = relation(Language)
-Version.version_group = relation(VersionGroup, back
ref
='versions')
+Version.version_group = relation(VersionGroup, back
_populates
='versions')
Version.generation = association_proxy('version_group', 'generation')
Version.generation = association_proxy('version_group', 'generation')
+VersionGroup.versions = relation(Version, order_by=Version.id, back_populates='version_group')
VersionGroup.generation = relation(Generation, backref='version_groups')
VersionGroup.version_group_regions = relation(VersionGroupRegion, backref='version_group')
VersionGroup.regions = association_proxy('version_group_regions', 'region')
VersionGroup.generation = relation(Generation, backref='version_groups')
VersionGroup.version_group_regions = relation(VersionGroupRegion, backref='version_group')
VersionGroup.regions = association_proxy('version_group_regions', 'region')