-Ability.all_pokemon = relation(Pokemon,
- secondary=PokemonAbility.__table__,
- order_by=Pokemon.order,
- #back_populates='all_abilities',
-)
-Ability.pokemon = relation(Pokemon,
- secondary=PokemonAbility.__table__,
- primaryjoin=and_(
- PokemonAbility.ability_id == Ability.id,
- PokemonAbility.is_dream == False
- ),
- order_by=Pokemon.order,
- #back_populates='abilities',
-)
-Ability.dream_pokemon = relation(Pokemon,
- secondary=PokemonAbility.__table__,
- primaryjoin=and_(
- PokemonAbility.ability_id == Ability.id,
- PokemonAbility.is_dream == True
- ),
- order_by=Pokemon.order,
- #back_populates='dream_ability',
-)