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, primary_key=True)
    parent_id = Column(Integer, ForeignKey('options.id_'))
    parent = relationship('Option',
        backref=backref('children', order_by=name,
                         remote_side=['options.c.id_']))

sqlalchemy.exc.ArgumentError: Relationship Option.children could not determine any local/remote column pairs from remote side argument set

How do I make this work with declarative?

Thanks,
Michael

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to