Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 76054 invoked from network); 16 Jan 2007 01:07:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jan 2007 01:07:59 -0000 Received: (qmail 66246 invoked by uid 500); 16 Jan 2007 01:07:52 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 66224 invoked by uid 500); 16 Jan 2007 01:07:52 -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 66200 invoked by uid 99); 16 Jan 2007 01:07:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 17:07:52 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of plinskey@bea.com designates 66.248.192.22 as permitted sender) Received: from [66.248.192.22] (HELO usremg02.bea.com) (66.248.192.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 17:07:43 -0800 Received: from usremr02.bea.com (mailrelay.bea.com [10.160.29.92]) by usremg02.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l0G17L87011130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 15 Jan 2007 17:07:21 -0800 Received: from repbex02.amer.bea.com (repbex02.bea.com [10.160.26.99]) by usremr02.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l0G17JuK028035 for ; Mon, 15 Jan 2007 17:07:20 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Schema and Table Name sometimes being ignored when supplied onl in orm.xml Date: Mon, 15 Jan 2007 17:07:20 -0800 Message-ID: <7D856CDFE035FF45A0420ACBD71BDD6302DB0EDA@repbex02.amer.bea.com> In-Reply-To: <45ABC9F1.7060105@pobox.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Schema and Table Name sometimes being ignored when supplied onl in orm.xml Thread-Index: Acc41Gq/sE5p19ioTVeu/MZapGfAvgANjomQ From: "Patrick Linskey" To: X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.2.131432 X-Virus-Checked: Checked by ClamAV on apache.org What do you get when you set the MetaData log channel to TRACE? -Patrick --=20 Patrick Linskey BEA Systems, Inc.=20 _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.=20 > -----Original Message----- > From: Don Brady [mailto:dbrady@pobox.com]=20 > Sent: Monday, January 15, 2007 10:38 AM > To: open-jpa-dev@incubator.apache.org > Subject: Schema and Table Name sometimes being ignored when=20 > supplied onl in orm.xml >=20 > I have entities like this which intentionally omit the schema and > table names: >=20 > @Entity > // @Table(name =3D "V_MBK_KEY") specified in orm.xml > public class FeMbkKey implements Serializable { > ........ >=20 > and in orm.xml I add the name and schema: >=20 > ...... > > > CLMR > > > com.ncfbins.services.mship.entity.entities > CLMR > =09 > > > >=20 > ...... >=20 >=20 > This works fine a lot of the time, resulting in correct queries like >=20 > SELECT MAX(f.mbkMemberIdNbr) FROM CLMR.V_MBK_KEY f ..... >=20 > that work fine. >=20 > However, sometimes it gets into a permanent manner of=20 > behavior where it > omits the table and schema additions that are in orm.xml; all queries > fail in the database because schema and table never got=20 > inserted before > the query is issued. >=20 > The final query sent to the database in such cases is=20 > omitting the real > schema and table name from orm.xml: >=20 > SELECT MAX(f.mbkMemberIdNbr) FROM FeMbkKey f >=20 > Of course these fail because there is no FeMbkKey table in=20 > the database, > just a CLMR.V_MBK_KEY table. >=20 > The strange thing is that nothing helps now to get it to go back to > honoring orm.xml. Yet, I have made essentially no changes=20 > from when it > worked to when it stopped working. >=20 > I have stepped through the openjpa source code and it is accessing and > parsing orm.xml successfully. Perhaps someone can tell me where would > be a couple of places in the source code to set breakpoints to see why > it is not translating the entity name into the Query. I have tried > using fully-package-qualified class names in orm.xml and that does not > help. I have traced through PersistenceMetaDataFactory and other > classes and cannot see where it goes wrong. >=20 > This is all on 0.9.6 final under WebSphere. It occurs on straight > openjpa 0.9.6 and also on IBM's packaged alpha update, and on multiple > fixpack levels of WebSphere. I think I tried 0.9.7 too. >=20 > For now, I will have to go back to putting the class and=20 > table in the > entities but eventually I want to be able to not bind those right into > the entities as we have multiple environments to run in... >=20 > Thanks! >=20 > Don >=20 >=20 >=20 >=20 >=20