Hibernate version:2.1.6
Hi,
I have an exotic data structure that I would like to map using Hibernate.
Here's the the columns of the table :
attribute1
attribute2
.
.
.
component1-att1
component1-att2
component2-att1
component2-att2
.
.
componentn-att1
componentn-att2
As you can notice, this data structure isn't easy to maintanin (if other components are added, I have to change the persistence class).
I would like to map this table to an Object with attribute1, ..., attributen with a collection of components with attributes : component-att1, component-att2. Changing the data base is not a possible option.
I've looked in the doc to component mapping and custom mapping but couldn't figure out a way to do it.
Any help is really appreciated.
|