From dev-return-20126-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon Feb 13 08:19:31 2012 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D02489B51 for ; Mon, 13 Feb 2012 08:19:31 +0000 (UTC) Received: (qmail 21592 invoked by uid 500); 13 Feb 2012 08:19:31 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 20987 invoked by uid 500); 13 Feb 2012 08:19:25 -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 20977 invoked by uid 99); 13 Feb 2012 08:19:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2012 08:19:22 +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; Mon, 13 Feb 2012 08:19:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 534431B4942 for ; Mon, 13 Feb 2012 08:18:59 +0000 (UTC) Date: Mon, 13 Feb 2012 08:18:59 +0000 (UTC) From: "Maria Jurcovicova (Created) (JIRA)" To: dev@openjpa.apache.org Message-ID: <827079333.31073.1329121139342.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (OPENJPA-2127) Join table in unidirectional one-to-many relationship with Map does not follow JPA v2 specification 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 Join table in unidirectional one-to-many relationship with Map does not follow JPA v2 specification --------------------------------------------------------------------------------------------------- Key: OPENJPA-2127 URL: https://issues.apache.org/jira/browse/OPENJPA-2127 Project: OpenJPA Issue Type: Bug Components: jdbc, jpa Affects Versions: 2.1.1 Reporter: Maria Jurcovicova According to JPA v2 specification page 50, the joining table name should be composed from entity names (e.g. class names) by default. The table should have two columns. Table name: * owner class name * underscore "_" * inverse class name. Name of the column with inverses ids: * the name of the relationship property or field of the owner * underscore "_" * the name of the primary key column in table inverse. If the annotated property maps data into the map, OpenJPA assumes different database structure. OpenJPA table name: * owner class name <- OK * underscore "_" <- OK * the name of the relationship property or field of the owner <- WRONG OpenJPA column with inverses id name: * "element_id" <- WRONG Note: this happens only with map. The default table structure with collection is different. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira