The openjpa.jdbc.Schema property should be your friend: http://incubator.apache.org/openjpa/docs/latest/manual/manual.html#openj pa.jdbc.Schema
-Patrick -- Patrick Linskey BEA Systems, Inc. _______________________________________________________________________ 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. > -----Original Message----- > From: Hans J. Prueller [mailto:[EMAIL PROTECTED] > Sent: Monday, February 19, 2007 10:59 AM > To: open-jpa-dev@incubator.apache.org > Subject: configurable db-schema-owner problem! > > hi together, > > > > I am evaluating JPA(OpenJPA) for one of our customers. The > usage scenarios > have a very special > > problem of which I do not know if there is a clear solution > by using JPA: > > > > The customers Oracle databases have very restricted access privileges: > > > > ==> the testing and development schemas/databases allow > access to the > schema owner (i.e. user) e.g. "USRT" > > ==> the production schemas/databases only allow access to > the schema > owner e.g. "USRP" > > > > this means that during development all queries have to > specify the usrt > owner, e.g. > > > > select col1,col2,col3 from USRTEST.TBL_NAME where cond1=cond2 . > > > > all of the statements have to be changed when being deployed to the > production system to: > > > > select col1,col2,col3 from USRPROD.TBL_NAME where cond1=cond2 . > > > > > > Currently I am implementing iBatis-based solutions where I > configured a > global parameter ${owner} in a "datasource.properties" > file which is loaded in sql-map-config.xml at initialization > time of the > iBatis SQLMaps Engine. In all queries throughout the project > > I use the ${owner} variable -> so I just need to change the > centralized > property value when deploying the system to the production > > server. > > > > Is there any similar approach which will solve this issue > when working with > OpenJPA? > > > > regards, > > HANS > > > > > > =========================== > virtually hanzz... > > > > <http://hanzz.zapto.org> http://hanzz.zapto.org (personal) > <http://www.cse.dmu.ac.uk/~hansp> http://www.cse.dmu.ac.uk/~hansp > (research) > > > >