Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 42350 invoked from network); 22 Mar 2007 19:55:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2007 19:55:53 -0000 Received: (qmail 82603 invoked by uid 500); 22 Mar 2007 19:56:01 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 82575 invoked by uid 500); 22 Mar 2007 19:56:01 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 82561 invoked by uid 99); 22 Mar 2007 19:56:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2007 12:56:01 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2007 12:55:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 27CF271403E for ; Thu, 22 Mar 2007 12:55:32 -0700 (PDT) Message-ID: <27169719.1174593332143.JavaMail.jira@brutus> Date: Thu, 22 Mar 2007 12:55:32 -0700 (PDT) From: "Michael Dick (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Updated: (OPENJPA-179) Schemas defined in orm.xml are only applied when a name is also specified. In-Reply-To: <28196308.1174593032185.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-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Dick updated OPENJPA-179: --------------------------------- Attachment: OpenJPA-179-example.zip Attaching simple example. Contains a test which just drives some SQL statements which show the default schema is only used if I define a table in orm.xml. > Schemas defined in orm.xml are only applied when a name is also specified. > --------------------------------------------------------------------------- > > Key: OPENJPA-179 > URL: https://issues.apache.org/jira/browse/OPENJPA-179 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Affects Versions: 0.9.6, 0.9.7 > Reporter: Michael Dick > Fix For: 0.9.7 > > Attachments: OpenJPA-179-example.zip > > > If a default schema name is specified (either as a mapping file default or a persistence unit default) it will only be applied if a table name is also included in the same xml descriptor. > For example if the xml file looks like this > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" > version="1.0"> > > > DefSchema > > > > > > > > > > > > > > > > > The default schema will be applied to MyEntityWithTable, but will not be applied to MyEntity. The same applies if the xml looks like this : > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" > version="1.0"> > DefSchema > . . . > > I think there are two problems here : > 1. The mapping file default schema (example 2) should apply to every entity in the xml mapping file (except where it's overridden by another entry or an annotation). > 2. A schema defined in the tag should apply to all entities in the persistence unit, not just the ones defined or overridden in the xml file. This default is overridden my the mapping file default schema, other xml schema entries and annotations. > I'll attach a simple sample of the problem, in case I'm missing something. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.