projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e1255ba
)
Make Type.moves a proper relation with an order_by.
author
Lynn "Zhorken" Vaughan
<zhorken@gmail.com>
Mon, 31 Jan 2011 21:36:20 +0000
(16:36 -0500)
committer
Lynn "Zhorken" Vaughan
<zhorken@gmail.com>
Mon, 31 Jan 2011 21:36:20 +0000
(16:36 -0500)
pokedex/db/tables.py
patch
|
blob
|
history
diff --git
a/pokedex/db/tables.py
b/pokedex/db/tables.py
index
1bbab38
..
e4dd61b
100644
(file)
--- a/
pokedex/db/tables.py
+++ b/
pokedex/db/tables.py
@@
-1434,7
+1434,7
@@
Move.super_contest_effect = relation(SuperContestEffect, backref='moves')
Move.super_contest_combo_next = association_proxy('super_contest_combo_first', 'second')
Move.super_contest_combo_prev = association_proxy('super_contest_combo_second', 'first')
Move.target = relation(MoveTarget, backref='moves')
Move.super_contest_combo_next = association_proxy('super_contest_combo_first', 'second')
Move.super_contest_combo_prev = association_proxy('super_contest_combo_second', 'first')
Move.target = relation(MoveTarget, backref='moves')
-Move.type = relation(Type, back
ref
='moves')
+Move.type = relation(Type, back
_populates
='moves')
Move.effect = markdown.MoveEffectProperty('effect')
Move.short_effect = markdown.MoveEffectProperty('short_effect')
Move.effect = markdown.MoveEffectProperty('effect')
Move.short_effect = markdown.MoveEffectProperty('short_effect')
@@
-1628,6
+1628,7
@@
Type.foreign_names = relation(TypeName, backref='type')
Type.pokemon = relation(Pokemon, secondary=PokemonType.__table__,
order_by=Pokemon.order,
back_populates='types')
Type.pokemon = relation(Pokemon, secondary=PokemonType.__table__,
order_by=Pokemon.order,
back_populates='types')
+Type.moves = relation(Move, back_populates='type', order_by=Move.name)
TypeName.language = relation(Language)
TypeName.language = relation(Language)