From dev-return-9332-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Thu Oct 09 16:23:20 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 98174 invoked from network); 9 Oct 2008 16:23:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2008 16:23:20 -0000 Received: (qmail 49822 invoked by uid 500); 9 Oct 2008 16:23:16 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 49082 invoked by uid 500); 9 Oct 2008 16:23:14 -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 49070 invoked by uid 99); 9 Oct 2008 16:23:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 09:23:14 -0700 X-ASF-Spam-Status: No, hits=-1999.9 required=10.0 tests=ALL_TRUSTED,DNS_FROM_SECURITYSAGE 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; Thu, 09 Oct 2008 16:22:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E703F234C213 for ; Thu, 9 Oct 2008 09:22:44 -0700 (PDT) Message-ID: <306750005.1223569364930.JavaMail.jira@brutus> Date: Thu, 9 Oct 2008 09:22:44 -0700 (PDT) From: "Albert Lee (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Assigned: (OPENJPA-741) default join column names are up-cased when using MySQL DBDictionary In-Reply-To: <268887903.1223478944252.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee reassigned OPENJPA-741: ---------------------------------- Assignee: Albert Lee > default join column names are up-cased when using MySQL DBDictionary > -------------------------------------------------------------------- > > Key: OPENJPA-741 > URL: https://issues.apache.org/jira/browse/OPENJPA-741 > Project: OpenJPA > Issue Type: Bug > Components: jdbc, third-party > Affects Versions: 1.1.0, 1.2.0 > Environment: 64-bit Linux, Sun JDK 1.6.0_07, mysql-5.0.67-linux-x86_64-glibc23 server, mysql-connector-java 5.1.6 > Reporter: Andy Schlaikjer > Assignee: Albert Lee > Priority: Minor > > On regeneration of database using the MappingTool and the MySQL DBDictionary (did not test with other backend DBs) some column names are being up-cased by default. Not all column names; just join column names involved in @ManyToOne relations (and perhaps elsewhere..): > @Entity > public class A { > @Id > private long id; // generated column name is "id" > @ManyToOne > private A parent; // generated column name is "PARENT_ID" > } > I can still force the generated column name to match the desired case by explicitly setting the name attribute of a @JoinColumn annotation: > @Entity > public class A { > @Id > private long id; // generated column name is "id" > @ManyToOne > @JoinColumn(name="parent_id") > private A parent; // generated column name is "parent_id" > } > This bug is not present in OpenJPA versions 1.0.2 nor 1.0.3, but is evident in 1.2.0 and 1.3.0. > In addition, it seems join column names in collection tables are also affected: > @Entity > public class A { > @Id > private long id; > @PersistentCollection > @CollectionTable > private Set strings; // generated table "A_strings" has join column "A_ID" > } > @Entity > public class A { > @Id > private long id; > @PersistentCollection > @CollectionTable(joinColumns = { @XJoinColumn(name = "A_id") }) > private Set strings; // generated table "A_strings" has join column "A_id" > } > This issue was first discussed in an email thread on openjpa-user mailing list: > http://thread.gmane.org/gmane.comp.apache.openjpa.user/2846 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.