mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Few more relations, for egg groups and evo chains.
This commit is contained in:
parent
7315189b10
commit
8fa671403b
1 changed files with 4 additions and 0 deletions
|
@ -183,10 +183,14 @@ class Version(TableBase):
|
||||||
|
|
||||||
|
|
||||||
### Relations down here, to avoid ordering problems
|
### Relations down here, to avoid ordering problems
|
||||||
|
EvolutionChain.growth_rate = relation(GrowthRate, backref='evolution_chains')
|
||||||
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
||||||
order_by=PokemonAbility.slot,
|
order_by=PokemonAbility.slot,
|
||||||
backref='pokemon')
|
backref='pokemon')
|
||||||
Pokemon.dex_numbers = relation(PokemonDexNumber, backref='pokemon')
|
Pokemon.dex_numbers = relation(PokemonDexNumber, backref='pokemon')
|
||||||
|
Pokemon.egg_groups = relation(EggGroup, secondary=PokemonEggGroup.__table__,
|
||||||
|
order_by=PokemonEggGroup.egg_group_id,
|
||||||
|
backref='pokemon')
|
||||||
Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon')
|
Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon')
|
||||||
Pokemon.foreign_names = relation(PokemonName, backref='pokemon')
|
Pokemon.foreign_names = relation(PokemonName, backref='pokemon')
|
||||||
Pokemon.generation = relation(Generation, backref='pokemon')
|
Pokemon.generation = relation(Generation, backref='pokemon')
|
||||||
|
|
Loading…
Reference in a new issue