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
-~----------~----~----~----~------~----~------~--~---
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard