I have a following domain model:
Entity1 -> ValueType1-> Entity2
How can I write the mapping file to represent the above situation (while retrieving Entity1)?
PS: I know I can use component tag when value type does not refer to another entity (in this case Entity2).
Thanks
You can use
many-to-oneinside yourcomponentto reference Entity2:In this case Entity2 needs to be a persistent class with its own mapping file.