posted 15 years ago
Hi people,
I'm getting some trouble on the integration of two JPA projects.
This is my scenario:
I have a table EMPLOYEE with its entity class mapped into EmployeeJPAProject and a table ADDRESS mapped into AddressJPAProject (each project has its own persistence.xml).
There's another table EMPLOYEE_ADDRESS in the database, which hold information about the relationship between EMPLOYEE and ADDRESS.
In the entity class for EMPLOYEE, the Employee.java, I inserted the following annotation:
With the code stated as above, I'm getting an error message "Referenced column "ID_ADDR" in join column "ID_ADDR" cannot be resolved".
I suspect the error happend because the entity class for ADDRESS is declared in a project different from EmployeeJPAProject and therefore JPA wasn't able to find the ADDRESS entity declaration.
Does anyone can give me some hints about how to make these two projects working together without changing the project structure?
Thanks.