this has just confused me for a while , and constantly trips me up...

    class FirstTable()
        __tablename__ = 'first_table'
        id = Column(Integer, primary_key=True)

    class SecondTable()
        __tablename__ = 'second_table'
        id = Column(sa.Integer, primary_key=True)
        first_table_id = Column(sa.Integer, ForeignKey("first_table.id") )
        first_table = relationship("FirstTable", primaryjoin="""FirstTable.id 
== SecondTable.first_table_id""")

was there a specific reason why the string in `ForeignKey` is for the 
table+column, and not an object, like in `relationship` ?  ( i know that 
`ForeignKey` can take an object too , i'm just wondering about the string )

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to