The moose likes Object Relational Mapping and the fly likes Hibernate: Trouble with a bidirectional list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: Trouble with a bidirectional list" Watch "Hibernate: Trouble with a bidirectional list" New topic

Hibernate: Trouble with a bidirectional list

Eric Nielsen
Ranch Hand

Joined: Dec 14, 2004
Posts: 194
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?
I agree. Here's the link: http://aspose.com/file-tools
subject: Hibernate: Trouble with a bidirectional list
Similar Threads
Repeated column in mapping for entity ERROR PLEASE HELP..
Adding associations to a join entity..
Problem with persisting entities because they become detached
Orphan delete doesn't seem to be working properly
Getting stuck with persisting a M:M relationship