This has the drawback that the embedded component class (Image) doesn't have the property imageName which is the map key. It may be undesirable.
In Hibernate 3.x, formula comes as a rescue here.
[Reference]
Hibernate: how to map a collection of embedded components keyed by one of the component's properties?
No comments:
Post a Comment