Schema:
PARENT
ID
CHILD
ID
PARENT_ID
CREATE_DATE
If I map a Parent-Child relationship and in addition I also map Child.ParentId, when the entity bean gets persisted i get this error: PARENT_ID specified twice.
Obviously the persistence layer is persisting all entity fields in addition to all relationship fields & not cathing dups.
So how can I map a relationship & also map the fields that make up that relationship? I'm mapping the fields so that I can use the foreign keys in some custom SQL.