From dev-return-15633-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Mar 12 15:06:27 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 7731 invoked from network); 12 Mar 2010 15:06:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Mar 2010 15:06:26 -0000 Received: (qmail 47762 invoked by uid 500); 12 Mar 2010 15:05:49 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 47712 invoked by uid 500); 12 Mar 2010 15:05:49 -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 47704 invoked by uid 99); 12 Mar 2010 15:05:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Mar 2010 15:05:49 +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; Fri, 12 Mar 2010 15:05:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7FC58234C4BE for ; Fri, 12 Mar 2010 15:05:27 +0000 (UTC) Message-ID: <1606508155.228051268406327515.JavaMail.jira@brutus.apache.org> Date: Fri, 12 Mar 2010 15:05:27 +0000 (UTC) From: "Jerry Carter (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1556) Exception thrown on first use of @Strategy in @Embeddable classes In-Reply-To: <92479667.158611268158887232.JavaMail.jira@brutus.apache.org> 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-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844532#action_12844532 ] Jerry Carter commented on OPENJPA-1556: --------------------------------------- Oliver: Interesting. Not sure what the protocol is for this project, but you might open a new JIRA report and link back to this one. > Exception thrown on first use of @Strategy in @Embeddable classes > ----------------------------------------------------------------- > > Key: OPENJPA-1556 > URL: https://issues.apache.org/jira/browse/OPENJPA-1556 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.0.0-beta2 > Environment: Mac OS X 10.6, Maven 2.2.x, Spring 3.0 > Reporter: Jerry Carter > Assignee: Fay Wang > Fix For: 2.0.0 > > Attachments: OPENJPA-1556.patch, openjpa1556.tar.zip > > > I have an entity (SimpleEntity) which references an ElementCollection (ChildOne.class). There is a @Strategy annotation on a field within the embeddable class. The first time a query is built for the entity, an exception is thrown: > org.apache.openjpa.persistence.ArgumentException: Attempt to map "com.example.ChildOne.address" failed: the owning entity is not mapped. > at org.apache.openjpa.jdbc.meta.MappingInfo.assertTable(MappingInfo.java:628) > at org.apache.openjpa.jdbc.meta.MappingInfo.createColumns(MappingInfo.java:558) > at org.apache.openjpa.jdbc.meta.ValueMappingInfo.getColumns(ValueMappingInfo.java:178) > at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.map(HandlerStrategies.java:65) > at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.map(HandlerFieldStrategy.java:81) > at org.apache.openjpa.jdbc.meta.FieldMapping.setStrategy(FieldMapping.java:146) > ... etc. ... > If the @Strategy is not present, everything works fine. If the exception is intentionally triggered, subsequent use is successful. > Google suggests that this behavior has been seen before and , though there appears to have been no resolution in either case and this differs by use of @ElementCollection. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.