• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Composite PK - encountered invalid index column error

 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

What am I doing wrong here?

Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic