Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 53086 invoked from network); 28 Apr 2009 18:42:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Apr 2009 18:42:52 -0000 Received: (qmail 21151 invoked by uid 500); 28 Apr 2009 18:42:52 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 20758 invoked by uid 99); 28 Apr 2009 18:42:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 18:42:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 18:42:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 72A6A234C052 for ; Tue, 28 Apr 2009 11:42:30 -0700 (PDT) Message-ID: <1253106659.1240944150468.JavaMail.jira@brutus> Date: Tue, 28 Apr 2009 11:42:30 -0700 (PDT) From: "Andy Jefferson (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-630) Support specification of exact class in SingleFieldIdentity In-Reply-To: <610370216.1239780135294.JavaMail.jira@brutus> 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/JDO-630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703789#action_12703789 ] Andy Jefferson commented on JDO-630: ------------------------------------ This behaviour is implemented in the RI. > Support specification of exact class in SingleFieldIdentity > ----------------------------------------------------------- > > Key: JDO-630 > URL: https://issues.apache.org/jira/browse/JDO-630 > Project: JDO > Issue Type: Improvement > Components: api2 > Reporter: Andy Jefferson > Fix For: JDO 2 maintenance release 3 > > Attachments: singlefieldidentity_exact.patch > > > When calling PersistenceManager.getObjectById() with a SingleFieldIdentity, there seems to be no way of avoiding the following > (if the implementation decides to do so): > "It is an implementation decision whether to access the data store, if required to determine the exact class. This will be the case of inheritance, where multiple PersistenceCapable classes share the same ObjectId class." > Now when I know for sure that the targetClassName of the given SingleFieldIdentity already denotes the correct class for the given id, how can I avoid that additional roundtrip to the database for finding the exact class? > It would be useful to have a way of specifying a SingleFieldIdentity to be for the exact class specified. This could be done by addition of methods > void setExact(boolean flag); > boolean getExact(); > to SingleFieldIdentity -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.