Hi!
We are trying to Map a Column (attributeId) one time as a String (just the ID) and one time as an Entity (Attribute) from the Attributes Table.
We realize that this is completely redundant, but unfortunately the people who originally constructed the mapping made a mistake and leaving out the String ID Property would mean a lot of restructuring in our code.
What we need is the attributeId to be saved via the String Property and when the object gets loaded we need access to one of the properties from the Attributes Table (which means we need the entire Attribute Object). The problem we were faced with is that when we map both the String Property and Entity Hibernate tries to insert into the attributeId Column twice (of course, because it is mapped twice).
In effect I'm holding a Foreign Key as a Property and also need to map the Foreign Key to retrieve one of the Properties of the referenced object.
|