I tried to write :
#------------------------------------------------------------------------------------
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String)
fullname = Column(String)
password = Column(String)
sons = relation(User, order_by=User.id, backref="parent")
#------------------------------------------------------------------------------------
But the as 'User' is not defined at the line "... relation ... " is
processed, the code above doesn't work.
So, does sqlalchemy support self 2 self relationship ?
If the answer is "YES", how to do it?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---