Delete Object Issue

From: Michael Gvirtzman (michael_g..ezeqint.net)
Date: Tue Sep 18 2007 - 15:48:37 EDT

  • Next message: Aristedes Maniatis: "Re: Modifying projects in Java"

    Hello,

    I'm using combination of cascade / deny relationships, and trying to introduce delete function. (I'm using version 2.)

    In case a deny rule fires for one of the childs (within cascade chain), I would expect deleteObject() to behave as transaction - i.e., not to do any change; however it apparently doesn't: it fires deny exception, but some of the childs (even those linked directly to denying objects) are still deleted - and then later, during commit, there is an error message due to foreign keys with deny rule.

    (Note that childs not having deny links are deleted, creating inconsistencies.)

    What is your recommendation? I'm generally using a temporary context to manage atomic in-memory transactions (with immediate commit to parent upon success), and only once in a time save the parent context to database; do I need to create atomic delete transaction myself (copy the entire cascading tree to the temp context, and only upon successful deletion commit changes to parent)? Any other suggestion?

    Thank you in advance,
    Michael Gvirtzman.



    This archive was generated by hypermail 2.0.0 : Tue Sep 18 2007 - 16:24:55 EDT