From: Zhorken Date: Mon, 27 Sep 2010 06:59:48 +0000 (-0400) Subject: Order Pokemon.stats by stat id. #366 X-Git-Tag: veekun-promotions/2010101501~8 X-Git-Url: http://git.veekun.com/zzz-pokedex.git/commitdiff_plain/064889eb9fc08bc439667c5d0384b12d13255782?hp=665bc6f5e6ecc895d4704b24822bea2a9c88466b Order Pokemon.stats by stat id. #366 --- diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 633d845..31b9445 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -893,7 +893,7 @@ Pokemon.habitat = association_proxy('pokemon_habitat', 'name') Pokemon.items = relation(PokemonItem, backref='pokemon') Pokemon.generation = relation(Generation, backref='pokemon') Pokemon.shape = relation(PokemonShape, backref='pokemon') -Pokemon.stats = relation(PokemonStat, backref='pokemon') +Pokemon.stats = relation(PokemonStat, backref='pokemon', order_by=PokemonStat.stat_id.asc()) Pokemon.types = relation(Type, secondary=PokemonType.__table__, order_by=PokemonType.slot.asc()) PokemonDexNumber.pokedex = relation(Pokedex)