Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate: Trouble with a bidirectional list

 
Eric Nielsen
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been struggling with a bidirectional list. Got something working, then realized I needed to flip which side controlled the relationship to allow the IndexColumn to be populated. I've tried following the example in the JPwH book but I get a "Repeated column in mapping for entity: com.ballroomregistrar.compinabox.online.data.Level column: position (should be mapped with insert="false" update="false")" exception. I don't see where the "repeated column" is coming from.

Here's my mapping.



Only accessors for the four members and constructors are omitted from the Level class. There is no member named "position" nor any sort of "virtual" member provided via accessors, etc.

There are numerous other collections hanging off the Competition entity, but none of them use an IndexColumn at present and none have a position field that could be leaking through.

I've also tried removing the various cascade settings (just to more exactly match the books example), but the same exception is thrown).

What am I overlooking?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!