Hello,

I noticed that when setting passive_deletes="all" on a relationship
and try to delete the parent object sqlalchemy still tries to query
the child object.  For the way my models are set up I can't have the
child object be queried.  I'm using a hybrid of horizontal and
vertical sharding in this relationship and sometimes the corresponding
table does not exist so it cannot be queried.

I have a patch that seems to fix the problem but I don't understand
sqlalchemy enough to know if this is the proper fix or if it should be
done somewhere else.

http://pastebin.com/wd2Dsdwu

This particular problem does not occur with passive_deletes=True but
other problems occur because I don't want existing objects to have any
fields nullified either if they are loaded in sqlalchemy.

I narrowed down the reason why this occurs to orm/attributes on line
383 but that doesn't seem to be the appropriate place for the fix.

Thanks for any input.

-Will

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to