From 2bcb6bb980ddcdaa54d03fe4aa065afab3bbfe46 Mon Sep 17 00:00:00 2001 From: Eevee Date: Tue, 25 May 2010 00:00:56 -0700 Subject: [PATCH] Fix a many-to-many join bug with evolutions. --- pokedex/db/tables.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index d57efed..5de85f9 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -795,11 +795,10 @@ Pokemon.egg_groups = relation(EggGroup, secondary=PokemonEggGroup.__table__, backref='pokemon') Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon') Pokemon.evolution_children = relation(Pokemon, - secondary=PokemonEvolution.__table__, primaryjoin=Pokemon.id==PokemonEvolution.from_pokemon_id, + secondary=PokemonEvolution.__table__, secondaryjoin=PokemonEvolution.to_pokemon_id==Pokemon.id, backref=backref('evolution_parent', - remote_side=[Pokemon.id], uselist=False, ), ) -- 2.7.4