[sqlalchemy] Adjacency List Relationships using declarative

2010-08-21 Thread Michael Hipp
I'm trying to do exactly what is described here: http://www.sqlalchemy.org/docs/mappers.html#adjacency-list-relationships But I'm using declarative. Here's what I have but it fails with the exception below: class Option(Base): __tablename__ = 'options' id_ = Column(Integer,

Re: [sqlalchemy] Adjacency List Relationships using declarative

2010-08-21 Thread Michael Hipp
On 8/21/2010 6:00 PM, Michael Bayer wrote: On Aug 21, 2010, at 5:16 PM, Michael Hipp wrote: How do I make this work with declarative? If you were to use string literals with remote_side here, its the full expression would be a string, i.e. remote_side=Option.id_. But that's not needed here

Re: [sqlalchemy] Adjacency List Relationships using declarative

2010-08-21 Thread Michael Bayer
On Aug 21, 2010, at 7:20 PM, Michael Hipp wrote: On 8/21/2010 6:00 PM, Michael Bayer wrote: On Aug 21, 2010, at 5:16 PM, Michael Hipp wrote: How do I make this work with declarative? If you were to use string literals with remote_side here, its the full expression would be a string, i.e.