That's it. Thanks!
Although it still took me a while to figure out how to do it. Just to
have a complete example in the mailinglist, I'll copy paste what I
have now:
class Category(DeclarativeBase):
__tablename__ = 'category'
category_id = Column(Integer, autoincrement=True,
primary_key=True)
name = Column(Unicode(255), unique=True, nullable=False)
parent_id = Column(Integer, ForeignKey("category.category_id"))
children = relation('Category', backref=backref('parent',
remote_side="Categorie.category_id"))
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---