Hey Michael,
Lets say I have a table TableA:
class TableA(Base):
__tablename__ = 'table_a'
id = Column(Integer, primary_key=True)
name = Column(String(collation='nocase'), unique=True, nullable=False)
Then TableB:
class TableB(Base):
__tablename__ = 'table_b'
id = Column(Integer, primary_key=True)
name_id = Column(Integer, ForeignKey('table_a.id', ondelete='CASCADE'),
nullable=False)
name = relationship(TableA)
Is there any way I can build TableB so that a consumer can pass just the
string value of the
intended reference (table_a.name) to table_b.name and have the orm infer
the reference?
Thanks for the help,
jlc
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.