On Mar 28, 2014, at 6:40 AM, Simon King <[email protected]> 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'}
> 
> PhotoObj.children = relationship(PhotoObj, backref=backref('parent',
> remote_side=[PhotoObj.pk]))

Yes, that works perfectly. Odd - that was one of my permutations at one point! 
I must have had something else going on.

Thanks!

Demitri

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to