From dev-return-11390-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Apr 08 00:36:34 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 79496 invoked from network); 8 Apr 2009 00:36:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Apr 2009 00:36:34 -0000 Received: (qmail 45959 invoked by uid 500); 8 Apr 2009 00:36:34 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 45914 invoked by uid 500); 8 Apr 2009 00:36:34 -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 45904 invoked by uid 99); 8 Apr 2009 00:36:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Apr 2009 00:36:34 +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; Wed, 08 Apr 2009 00:36:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8F50D234C055 for ; Tue, 7 Apr 2009 17:36:13 -0700 (PDT) Message-ID: <973731655.1239150973585.JavaMail.jira@brutus> Date: Tue, 7 Apr 2009 17:36:13 -0700 (PDT) From: "Oleg Zenzin (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1019) orm.xml does not override annotations In-Reply-To: <474241504.1238779092961.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/OPENJPA-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696845#action_12696845 ] Oleg Zenzin commented on OPENJPA-1019: -------------------------------------- We need this fix pretty soon, so I'm commited to try to fix it and check-in into version 1.2.0 or 1.1.0 if anyone could point me where should I look to in sources. > orm.xml does not override annotations > ------------------------------------- > > Key: OPENJPA-1019 > URL: https://issues.apache.org/jira/browse/OPENJPA-1019 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.1.0 > Environment: OpenJPA 1.1.0, DBMS Embedded Derby 10.2.2.0 > Reporter: Oleg Zenzin > Attachments: openjpa.test.zip > > > I need to use both annotations and orm.xml to sometimes override mapping defined with annotations in the compiled file. According to manual: > Persistence metadata is specified using either the Java 5 annotations defined in the javax.persistence package, XML mapping files, or a mixture of both. In the latter case, XML declarations override conflicting annotations. > I have created and attached test case where I use orm.xml to override a column name: class org.intalio.tempo.workflow.task.Task has field _id which is mapped to column "TID" by use of annotations. In file orm.xml I map this same field to column "ITD" and expect OpenJPA to create DB schema accordingly (openjpa.jdbc.SynchronizeMappings=buildSchema). But my test shows that it does not happen, i.e. mapping defined in orm.xml does not impact or override mapping defined with annotations. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.