OK its fixed in r2314. the cascade from User.meta does take effect, its just that the combination primary key/foreign key column on the t_userdata table was being blanked out when the deletion of the "User" took place, i.e. it was not checking first that the Userdata was also being deleted. usually the "delete-orphan" cascade would be present which was hiding the issue.
in the spirit of svilen I added a more exhaustive set of tests than I usually do, for various scenarios in this category, and located some variants of the same issue in the process. On Feb 13, 6:01 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote: > On Feb 13, 3:26 pm, "Nebur" <[EMAIL PROTECTED]> wrote: > > > Therefore, I expected the following declaration > > > mapper(Userdata, t_userdata, properties = { > > > "myuser":relation(User,backref=backref("meta",cascade="delete")) > > }) > > > to define a cascade where User.delete triggers a Userdata.delete. > > (I expected this because the "cascade" keyword is in the "backref", > > not in the "relation" !) > > it does. this is a bug in SA. fix will be up shortly. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---