openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Mutdosch <tom...@gmail.com>
Subject best way to set default schema across all entities
Date Tue, 28 Aug 2007 12:51:19 GMT
Hi guys,

I asked this before but it got lost in the shuffle.  I am looking for 
the best way to set a default schema for all entities.  The scenario is 
a DB2 database using a different schema for testing and deploy time.  So 
I would want just one place that I could quickly change the schema when 
necessary.  I can successfully do this using an openjpa property in my 
persistence.xml:
<property name="openjpa.jdbc.Schema" value="ADMINISTRATOR"/>

But that doesn't seem as clean.  Should I be able to set the default 
schema in the orm.xml?  I have been unable to get that to work, and I'm 
not sure if it's because something is going wrong, or if it's not 
supported.  Does setting the default schema in the orm.xml only apply to 
entities that are also mapped in there?  Maybe the Java entities (with 
no schema set via an annotation) are somehow overriding the schema 
defined in the orm.xml.  What is the expected behavior here?

Thanks
Tom

Mime
View raw message