On Monday, June 20, 2011 07:34:42 PM Michael Bayer wrote:
SQLA doesn't automatically create any objects so you'd need to create the
Parent object yourself, but you'd also use relationship():
class Child(Base):
parent_name = Column(String, ForeignKey('parent.name'))
parent =
On Jun 22, 2011, at 2:53 AM, Fayaz Yusuf Khan wrote:
On Monday, June 20, 2011 07:34:42 PM Michael Bayer wrote:
SQLA doesn't automatically create any objects so you'd need to create the
Parent object yourself, but you'd also use relationship():
class Child(Base):
parent_name =
Hi, I'm a SQLA and MySQL noob.
I have a many to one relationship somewhat similar to this:
class Parent(Base):
...
name = Column(String, primary_key=True)
class Child(Base):
...
parent = Column(String, ForeignKey('Parent.name'))
And I'm trying to do this:
session.add(Child(...,