Hi all, I've been using soft deletes as described by Gabriel's post:
http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/08/soft-deletes.aspx The issue I have is the order in which the update statements are performed. We have to perform a soft delete because an after-update trigger copies the row in an audit table before physically deleting the record from the DB. Taking the same example from the blog post, when deleting an order with order lines, the order of the update statements is: UPDATE Order ... UPDATE OrderLine ... // First order line UPDATE OrderLine ... // Second order line It first updates the order after which the order lines are updated. This is where the issue arises. When the order is updated, the trigger is executed, copyies the record to a separate audit table and tries to delete the record and fails because of the FK constraint to the order lines. Is it possible to tweak the order in which the update statements are performed? I know that changing the trigger is the best solution, but the DBA are gods around here and they don't want to change it. Any thoughts? Thanks in advance, Jan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
