put it as text, it will be eval()'uated later

On Monday 16 February 2009 10:57:11 一首诗 wrote:
> 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 sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to