afaik, u can supply strings instead of real things everywhere in those
arguments.. they are eval()ed against some context at later time.
On Thursday 11 December 2008 10:40, Andreas Jung wrote:
> Can the decl. layer be used to setup a self-referential mapper like
>
>
> class Foo(Base):
>
> __tablename__ = 'foo'
> __table_args__ = {'autoload' : True}
>
> children = relation(Foo, primaryjoin=Foo.parent_id==Foo.id)
> parent = relation(Foo, primary_join=Foo.parent_id=Foo.id,
> remote_side=[Foo.id])
>
> Basically using 'Foo' within the relation() does not work within the
> class definition of Foo itself.
>
> Andreas
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---