mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Make version_group.versions an actual relation with an order_by().
This commit is contained in:
parent
4e5415ac56
commit
e7784d6467
1 changed files with 2 additions and 1 deletions
|
@ -1578,9 +1578,10 @@ Type.foreign_names = relation(TypeName, backref='type')
|
|||
|
||||
TypeName.language = relation(Language)
|
||||
|
||||
Version.version_group = relation(VersionGroup, backref='versions')
|
||||
Version.version_group = relation(VersionGroup, back_populates='versions')
|
||||
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')
|
||||
|
|
Loading…
Reference in a new issue