openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Mutdosch <>
Subject Setting default schema in orm.xml?
Date Thu, 16 Aug 2007 14:10:25 GMT
Hi there,

I am using a DB2 database and I can't seem to easily set the default 
schema for all of my entities using the orm.xml.  I guess by default, 
openjpa uses a schema based on the username.  In my case, my username is 
DB2ADMIN, but there is no schema by that name; instead the schema is 
ADMINISTRATOR.  I tried to set the default schema in the meta-inf/orm.xml:

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="" 
xsi:schemaLocation="" version="1.0">

That didn't seem to work.  It still failed at runtime trying to find the 
table using the wrong schema (the runtime logging did show that the 
correct orm.xml was being processed properly.)  I am able to set the 
default schema successfully using an openjpa property in the 
<property name="openjpa.jdbc.Schema" value="ADMINISTRATOR"/>

But that isn't very portable.  Do you know if I should be able to 
specify the schema in the orm.xml in this fashion?  Or does that only 
work if I have my entity mappings defined in the orm.xml as well?


View raw message