From 97e15e3f082672477f807163fcffcbfeb2f69c04 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 29 Feb 2012 22:05:32 +0100 Subject: [PATCH] Make the VersionGroup.machines relationship into a backref --- pokedex/db/tables.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 87e1320..311430b 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -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,