projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
edf1bde
)
Fix a many-to-many join bug with evolutions.
author
Eevee
<git@veekun.com>
Tue, 25 May 2010 07:00:56 +0000
(
00:00
-0700)
committer
Eevee
<git@veekun.com>
Tue, 25 May 2010 07:12:53 +0000
(
00:12
-0700)
pokedex/db/tables.py
patch
|
blob
|
history
diff --git
a/pokedex/db/tables.py
b/pokedex/db/tables.py
index
d57efed
..
5de85f9
100644
(file)
--- 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,
backref='pokemon')
Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon')
Pokemon.evolution_children = relation(Pokemon,
- secondary=PokemonEvolution.__table__,
primaryjoin=Pokemon.id==PokemonEvolution.from_pokemon_id,
primaryjoin=Pokemon.id==PokemonEvolution.from_pokemon_id,
+ secondary=PokemonEvolution.__table__,
secondaryjoin=PokemonEvolution.to_pokemon_id==Pokemon.id,
backref=backref('evolution_parent',
secondaryjoin=PokemonEvolution.to_pokemon_id==Pokemon.id,
backref=backref('evolution_parent',
- remote_side=[Pokemon.id],
uselist=False,
),
)
uselist=False,
),
)