Composite PK - encountered invalid index column error
posted 8 years ago
I've a table with a composite primary key. Following the Hibernate reference, I used:
There's also a foreign key mapping (not shown). So what I did was to create an object and try to persist it, but encountered SQLException: invalid column index. However, if I don't use this , it works. I've to also remove the three properties (to avoid duplicate).
Essentially what I was trying to do is to allow for searching of a list of object that matches 1 of the property in the composite key. The search was fine, but when I tried to insert, the exception occurred.