On Jun 29, 2007, at 10:38 AM, Huy Do wrote:
> > Hi, > > How do I configure my mapper/table to leave the cascade up to my > database. i.e I don't want SA to auto update or delete my child > objects > when I delete or update my parent object. > you are probably looking for "passive_deletes=True" on your relations. you can also prevent SQLAlchemy from marking child items as deleted by just not using "delete" cascade, but you cannot prevent it from updating the foreign key of child items with NULL..also if a delete cascade takes place, the session's view of objects will be incorrect if one of the deleted child items is still present in the session...so best to leave your cascade matching that of the database. the passive_deletes flag will just prevent it from defensively loading in child items upon delete which is probably what youre looking for. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---