Re: [sqlalchemy] Self-join and autoload

2014-03-28 Thread Simon King
On Fri, Mar 28, 2014 at 1:16 AM, thatsanicehatyouh...@mac.com wrote: Hi, I'm trying to configure a table with autoload but can't quite get the syntax to set up a self-relationship. This is my abbreviated) schema: CREATE TABLE sdssphoto.photoobj ( pk bigint NOT NULL DEFAULT

Re: [sqlalchemy] Self-join and autoload

2014-03-28 Thread thatsanicehatyouhave
On Mar 28, 2014, at 6:40 AM, Simon King si...@simonking.org.uk wrote: The alternative is to define the children relationship after the class has been defined: class PhotoObj(Base): __tablename__ = 'photoobj' __table_args__ = {'autoload':True, 'schema':'sdssphoto'}

[sqlalchemy] Self-join and autoload

2014-03-27 Thread thatsanicehatyouhave
Hi, I'm trying to configure a table with autoload but can't quite get the syntax to set up a self-relationship. This is my abbreviated) schema: CREATE TABLE sdssphoto.photoobj ( pk bigint NOT NULL DEFAULT nextval('photoobj_pk_seq'::regclass), parent_photoobj_pk bigint CONSTRAINT