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:
8e3697d
)
Order Ability's Pokémon relations by Pokemon.order.
author
Lynn "Zhorken" Vaughan
<zhorken@gmail.com>
Mon, 31 Jan 2011 22:02:34 +0000
(17:02 -0500)
committer
Lynn "Zhorken" Vaughan
<zhorken@gmail.com>
Mon, 31 Jan 2011 22:02:34 +0000
(17:02 -0500)
pokedex/db/tables.py
patch
|
blob
|
history
diff --git
a/pokedex/db/tables.py
b/pokedex/db/tables.py
index
e4dd61b
..
b5f1d7d
100644
(file)
--- a/
pokedex/db/tables.py
+++ b/
pokedex/db/tables.py
@@
-1318,6
+1318,7
@@
Ability.foreign_names = relation(AbilityName, backref='ability')
Ability.generation = relation(Generation, backref='abilities')
Ability.all_pokemon = relation(Pokemon,
secondary=PokemonAbility.__table__,
Ability.generation = relation(Generation, backref='abilities')
Ability.all_pokemon = relation(Pokemon,
secondary=PokemonAbility.__table__,
+ order_by=Pokemon.order,
back_populates='all_abilities',
)
Ability.pokemon = relation(Pokemon,
back_populates='all_abilities',
)
Ability.pokemon = relation(Pokemon,
@@
-1326,6
+1327,7
@@
Ability.pokemon = relation(Pokemon,
PokemonAbility.ability_id == Ability.id,
PokemonAbility.is_dream == False
),
PokemonAbility.ability_id == Ability.id,
PokemonAbility.is_dream == False
),
+ order_by=Pokemon.order,
back_populates='abilities',
)
Ability.dream_pokemon = relation(Pokemon,
back_populates='abilities',
)
Ability.dream_pokemon = relation(Pokemon,
@@
-1334,6
+1336,7
@@
Ability.dream_pokemon = relation(Pokemon,
PokemonAbility.ability_id == Ability.id,
PokemonAbility.is_dream == True
),
PokemonAbility.ability_id == Ability.id,
PokemonAbility.is_dream == True
),
+ order_by=Pokemon.order,
back_populates='dream_ability',
)
back_populates='dream_ability',
)