From c5fee20ef1dba25e145cbe7f1d5c57f10a74c183 Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Sun, 20 Nov 2011 21:11:15 -0800 Subject: [PATCH] Make Encounter.condition_values a relationship(). --- pokedex/db/tables.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index c2aee5a..522405c 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -2234,9 +2234,9 @@ ContestCombo.second = relationship(Move, innerjoin=True, lazy='joined', backref='contest_combo_second') -Encounter.condition_value_map = relationship(EncounterConditionValueMap, - backref='encounter') -Encounter.condition_values = association_proxy('condition_value_map', 'condition_value') + +Encounter.condition_values = relationship(EncounterConditionValue, + secondary=EncounterConditionValueMap.__table__) Encounter.location_area = relationship(LocationArea, innerjoin=True, lazy='joined', backref='encounters') @@ -2253,9 +2253,6 @@ Encounter.slot = relationship(EncounterSlot, EncounterConditionValue.condition = relationship(EncounterCondition, innerjoin=True, lazy='joined', backref='values') -EncounterConditionValueMap.condition_value = relationship(EncounterConditionValue, - innerjoin=True, lazy='joined', - backref='encounter_map') EncounterSlot.method = relationship(EncounterMethod, innerjoin=True, lazy='joined',