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

ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1M3
    • 3.1B1
    • Core Library
    • None

    Description

      ObjectContext.localObject(Persistent) created per CAY-1611 has a subtle difference with deprecated version of "localObject" - when passed a temporary ID, it does not blindly assumes this ID is valid, but rather tries to find it along the chain of parent contexts and throws immediately on failure. On the other hand we defer checking of permanent IDs, waiting for the user to access object properties outside 'localObject'.

      Permanent IDs can easily be invalid too (e.g. a DB row underneath can be deleted). Besides a valid ID can become invalid at any moment before or after localObject call. So a difference in handling both types of IDs is not logical. Let's defer temp ID checking, just like we do for perm ID.

      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: