thats diff. thing, see self-ref. relations
http://www.sqlalchemy.org/docs/05/mappers.html#adjacency-list-relationships


On Monday 16 February 2009 11:18:59 一首诗 wrote:
> Like this ?
> -------------------------------------------------------------------
>----------------------------- 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")
>
> -------------------------------------------------------------------
>-----------------------------
>
> I got an Exception:
>
> sqlalchemy.exc.ArgumentError: Could not determine join condition
> between parent/child tables on relation User.sons.  Specify a
> 'primaryjoin' expression.  If this is a many-to-many relation,
> 'secondaryjoin' is needed as well.
>
> On Feb 16, 5:08 pm, a...@svilendobrev.com wrote:
> > put it as text, it will be eval()'uated later

--~--~---------~--~----~------------~-------~--~----~
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