openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gul Onural" <>
Subject Unexpected behavior with foreign key constraints
Date Wed, 14 Nov 2007 06:51:32 GMT

I have two classes with one to one relationship on both sides and they
are correctly set in the JPA code.

If I do not enforce the foreign key constraint in my table creation
script and if I let the openjpa create the tables
everything seem to work correctly.

However, if I create the tables with my sql script  with foreign key
constrains and disable the openjpa's automatic creation,
I get foreign key constraint violation exception which I find quite

I marked the fetch = FetchType.EAGER in my relationship setting
annotations. Is the behavior I am seeing has anything to do with this?

Is it not allowed to put foreign key constraints in table creation with

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message