Make version_group.versions an actual relation with an order_by().

This commit is contained in:
Zhorken 2010-12-06 17:56:43 -05:00
parent 4e5415ac56
commit e7784d6467

View file

@ -1578,9 +1578,10 @@ Type.foreign_names = relation(TypeName, backref='type')
TypeName.language = relation(Language) 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') 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.generation = relation(Generation, backref='version_groups')
VersionGroup.version_group_regions = relation(VersionGroupRegion, backref='version_group') VersionGroup.version_group_regions = relation(VersionGroupRegion, backref='version_group')
VersionGroup.regions = association_proxy('version_group_regions', 'region') VersionGroup.regions = association_proxy('version_group_regions', 'region')