You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Created) (JIRA)" <ji...@apache.org> on 2012/01/22 08:21:40 UTC

[jira] [Created] (CAY-1651) ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs

ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs
-------------------------------------------------------------------------

                 Key: CAY-1651
                 URL: https://issues.apache.org/jira/browse/CAY-1651
             Project: Cayenne
          Issue Type: Improvement
          Components: Core Library
    Affects Versions: 3.1M3
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik
            Priority: Minor
             Fix For: 3.1M4


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.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAY-1651) ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs

Posted by "Andrus Adamchik (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190626#comment-13190626 ] 

Andrus Adamchik commented on CAY-1651:
--------------------------------------

Side effect of the new implementation - ObjectIdQuery with non-existing temp ID will now execute successfully , but return no rows (in the past Cayenne stack would throw)
                
> ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs
> -------------------------------------------------------------------------
>
>                 Key: CAY-1651
>                 URL: https://issues.apache.org/jira/browse/CAY-1651
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 3.1M3
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 3.1M4
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CAY-1651) ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs

Posted by "Andrus Adamchik (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1651.
--------------------------------

    Resolution: Fixed
    
> ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs
> -------------------------------------------------------------------------
>
>                 Key: CAY-1651
>                 URL: https://issues.apache.org/jira/browse/CAY-1651
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 3.1M3
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 3.1M4
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira