openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Defoy" <>
Subject Re: Unexpected behavior with foreign key constraints
Date Wed, 14 Nov 2007 14:10:46 GMT
It could be because OpenJPA does not know about your foreign keys...
You have to tell OpenJPA that there is a foreign key using the
@ForeignKey annotation or instruct OpenJPA to detect the foreign keys
by inspecting your schema.  To do this, you have to specify the
following property in your persistence.xml:

<property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)" />

Hope this helps!


View raw message