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 strange. 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 openjpa?
