[sqlalchemy] Re: 0.5rc3 problem (works in 0.5rc2 and 0.4.8)

2008-11-10 Thread Michael Bayer
Hi David - One thing I notice is that your remote_side on the self referential relation from TypeNode-Children is not needed, whereas it *is* needed on the TypeNode-Parent side, which is the many to one side, using backref=backref('Parent', remote_side=[typehierarchy_table.c.id]).

[sqlalchemy] Re: 0.5rc3 problem (works in 0.5rc2 and 0.4.8)

2008-11-10 Thread David Gardner
Yeah, I kinda figured that out in a round-about way, because 0.5rc2 and 0.4.8 would get me my object, but then node.Parent was the collection of children. Thanks for the response. Michael Bayer wrote: Hi David - One thing I notice is that your remote_side on the self referential relation

[sqlalchemy] Re: 0.5rc3 problem (works in 0.5rc2 and 0.4.8)

2008-11-10 Thread David Gardner
I ended up having problems with my backref (in any version of SA) so I re-worked my mappers and now 0.5rc3 is generating correct SQL. So this probably isn't a bug. mapper(TypeNode, typehierarchy_table, properties={ 'AutoPopNames':relation(TypeAutoPop, backref='TypeNode'),