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!

Christian

Reply via email to