Have you tried setting the following property ? It seemed to fix my recreate of your scenario (on trunk anyway).
<property name="openjpa.jdbcSchemaFactory" value="native(ForeignKeys=true)"/> Thanks, Rick On Wed, Nov 9, 2011 at 9:23 AM, M. Walter <marc.wal...@sbb.ch> wrote: > Hi Rick, > > these are the properties for the unit test PU: > > <properties> > <property name="openjpa.Log" value="DefaultLevel=INFO, SQL=WARN, > JDBC=WARN, Query=TRACE, Schema=ERROR, Runtime=WARN" /> > <property name="openjpa.ConnectionFactoryProperties" > value="PrintParameters=true, PrettyPrint=true" /> > <property name="openjpa.LockManager" value="version" /> > <property name="openjpa.jdbc.TransactionIsolation" > value="read-committed" /> > <property name="openjpa.DetachState" > value="fetch-groups(DetachedStateField=true)" /> > </properties> > > And these properties are for production environment: > > <properties> > <property name="openjpa.ConnectionFactoryProperties" > value="PrintParameters=true" /> > <property name="openjpa.LockManager" value="version" /> > <property name="openjpa.jdbc.TransactionIsolation" > value="read-committed" /> > <property name="openjpa.DetachState" > value="fetch-groups(DetachedStateField=true)" /> > </properties> > > -- > -- *Rick Curtis*