you can use strings with Python in them when you use declarative even
with args like primaryjoin, so you could say things like:

class Policy(DeclarativeBase):
    __tablename__ = 'policy'

    policy_state =
relation('State',backref='state_policies',primaryjoin="Policy.state_of_policy_code==State.code")
    domicile_state =
relation('State',backref='domicile_policies',primaryjoin="Policy.state_of_domicile_code==State.code")

this would eliminate the need to have your classes in a particular
order.

Its documented about a third of the way down at
http://www.sqlalchemy.org/docs/05/plugins.html#plugins_declarative .


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to