[sqlalchemy] self referential with 2 forign key constraints

2010-02-17 Thread cropr
I have defined a self refential class ContentObject to build a node tree wih parent child relationships. class ContentObject(Base): __tablename__ = 'contentobject' _contentType = 'contentobject' id = Column(types.Integer, primary_key=True, autoincrement=True) parent_id =

Re: [sqlalchemy] self referential with 2 forign key constraints

2010-02-17 Thread Michael Bayer
On Feb 17, 2010, at 6:15 AM, cropr wrote: I have defined a self refential class ContentObject to build a node tree wih parent child relationships. class ContentObject(Base): __tablename__ = 'contentobject' _contentType = 'contentobject' id = Column(types.Integer,