From dev-return-18869-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Apr 01 14:39:44 2011 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 33869 invoked from network); 1 Apr 2011 14:39:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2011 14:39:43 -0000 Received: (qmail 78255 invoked by uid 500); 1 Apr 2011 14:39:43 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 78224 invoked by uid 500); 1 Apr 2011 14:39:43 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 78216 invoked by uid 99); 1 Apr 2011 14:39:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Apr 2011 14:39:43 +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; Fri, 01 Apr 2011 14:39:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CCB678D3BC for ; Fri, 1 Apr 2011 14:39:05 +0000 (UTC) Date: Fri, 1 Apr 2011 14:39:05 +0000 (UTC) From: "Michael Dick (JIRA)" To: dev@openjpa.apache.org Message-ID: <1901666563.28402.1301668745830.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <26864975.69441288049060790.JavaMail.jira@thor> Subject: [jira] [Updated] (OPENJPA-1854) A 'find' or 'query' may return multiple instances of Entities which contain Embeddables, where the Embeddables use String identities, if the id value has trailing spaces. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Dick updated OPENJPA-1854: ---------------------------------- Fix Version/s: (was: 2.0.1) 2.0.2 > A 'find' or 'query' may return multiple instances of Entities which contain Embeddables, where the Embeddables use String identities, if the id value has trailing spaces. > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-1854 > URL: https://issues.apache.org/jira/browse/OPENJPA-1854 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.2.2, 1.3.0, 2.0.0 > Reporter: Heath Thomann > Assignee: Heath Thomann > Fix For: 1.2.3, 2.0.2, 2.1.1 > > Attachments: OPENJPA-1854-1.2.x.test > > > This issue is very similar to that of OPENJPA-1501, with one twist.......I've found that when you have an Embeddable, which has Strings as the keys/ids, openJPA code puts the Embeddable into an ObjectID by design, rather than a StringID....recall, the fix to OJ1501 was to strip white space from the end of a user's String key when that String was placed into a StringID. So, the strings in an Embeddable would also need to be stripped, just as was done in OJ-1501, but unfortunately it would seem to be harder to do so for Embeddables since openJPA code doesn't necessarily know what types are contained in the Embed. > I've created a JUnit test case which has three test methods. The test is attached here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira