Hi,
I recently refactored a persistence layer toward JOINED inheritance. Afterwards I had a @Many2One assocation which stopped working:
@OneToOne(fetch=FetchType.LAZY)
@JoinTable(name="Patient2CRMDoctorV",joinColumns={@JoinColumn(name="patientId")}, inverseJoinColumns={@JoinColumn(name="doctorId")} )
private Doctor doctor;
Patient2CRMDoctorV is a view in the database.
The error is:
Invocation of init method failed; nested exception is org.hibernate.AssertionFailure: Table Patient2CRMDoctorV not found
Are there any known issues with this combination. I found an older unanswered post with the same problem.
Regards,
Bernd
The problem only occurs if the assocation is between 2 classes from the same inheritance hierarchy.