I get used to hibernation, but from time to time I come across a stumble, here's another one.
I am trying to achieve the following:
@OneToMany @JoinTable(name = "inter_spec", joinColumns = { @JoinColumn(name = "inter_id") }, inverseJoinColumns = { @JoinColumn(name = "spec_id") }) @WhereJoinTable(clause = "spec_type=SECTION") public List<Section> getSections() { return sections; }
But when starting my unit test:
The following error occurs:
[ERROR] JDBCExceptionReporter - column "SECTIONS0_.SECTION" was not found; SQL statement:
All I want to do is apply the Where clause so that only the data of type SECTION is in my sections of the list.
If I delete the Where my unit test clause, the statement in the list has the expected data.
Thanks for reading.
hibernate jointable
C0deAttack
source share