Hi all.
Beside all the goodies that Hibernate has for mapping domain model, is there some special reason why it cannot map hierarchy of value objects, only entities?
There is whole chapter about mapping hierarchy of entities and various strategies for it, but no mention about value objects like they cannot have hierarchy.
I can only map plain value object using <component>, but for hierarchy it seems I am forced to create ugly and cumbersome specialized UserType for such hierarchy that will take care of handling some discriminator column (similar to entity hierarchy mapping) by which I can recreate proper value object subclass. :-(
Regards,
Vjeran
|