Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A94AB67E for ; Sun, 22 Jan 2012 08:16:03 +0000 (UTC) Received: (qmail 34598 invoked by uid 500); 22 Jan 2012 08:16:03 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 34563 invoked by uid 500); 22 Jan 2012 08:16:02 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 34556 invoked by uid 99); 22 Jan 2012 08:16:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jan 2012 08:16:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jan 2012 08:15:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9EB8814B424 for ; Sun, 22 Jan 2012 08:15:38 +0000 (UTC) Date: Sun, 22 Jan 2012 08:15:38 +0000 (UTC) From: "Andrus Adamchik (Closed) (JIRA)" To: commits@cayenne.apache.org Message-ID: <149335449.64333.1327220138651.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1426297036.64313.1327216900332.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (CAY-1651) ObjectContext.localObject - defer FaultFailureExceptions on temporary IDs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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