Make the VersionGroup.machines relationship into a backref

This commit is contained in:
Petr Viktorin 2012-02-29 22:05:32 +01:00
parent 61ed3c4ccb
commit 97e15e3f08

View file

@ -1783,7 +1783,7 @@ LocationGameIndex.generation = relationship(Generation,
Machine.item = relationship(Item)
Machine.version_group = relationship(VersionGroup,
innerjoin=True, lazy='joined')
innerjoin=True, lazy='joined', backref='machines')
Move.changelog = relationship(MoveChangelog,
@ -2150,9 +2150,6 @@ VersionGroup.pokemon_move_methods = relationship(PokemonMoveMethod,
primaryjoin=and_(VersionGroup.id == VersionGroupPokemonMoveMethod.version_group_id),
secondaryjoin=and_(PokemonMoveMethod.id == VersionGroupPokemonMoveMethod.pokemon_move_method_id),
backref="version_groups")
VersionGroup.machines = relationship(Machine,
innerjoin=True,
order_by=Machine.machine_number)
VersionGroupPokemonMoveMethod.version_group = relationship(VersionGroup,