Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-721

DataContext shouldn't attempt to fix objects on FaultFailureExceptions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M1, 3.0
    • None
    • None

    Description

      The following code that I will be removing attempts to react to FaultFailureExceptions... This creates confusion cause evicted object can still be attached to other valid objects, messing up the object graph.

      Index: /Users/andrus/work/cayenne/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
      ===================================================================
      — /Users/andrus/work/cayenne/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java (revision 486054)
      +++ /Users/andrus/work/cayenne/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java (working copy)
      @@ -39,7 +39,6 @@
      import org.apache.cayenne.DataRow;
      import org.apache.cayenne.DeleteDenyException;
      import org.apache.cayenne.Fault;
      -import org.apache.cayenne.FaultFailureException;
      import org.apache.cayenne.ObjectContext;
      import org.apache.cayenne.ObjectId;
      import org.apache.cayenne.PersistenceState;
      @@ -1587,17 +1586,6 @@
      }
      }

      • public void prepareForAccess(Persistent object, String property, boolean lazyFaulting) {
      • try { - super.prepareForAccess(object, property, lazyFaulting); - }
      • catch (FaultFailureException e) { - // evict bad object - getObjectStore().processDeletedID(object.getObjectId()); - throw e; - }
      • }
        -
        /**
      • @since 1.2
        */

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: