I have an enity 'Foo' which contains a collection of value objects 'Person', person consist of simple properties like "name" and a a collection of value objects 'NameChange', which is information about previous person names.
I wanted to map it as:
<class name="Foo">
<bag name="Persons">
<composite-element class="Person">
<property name="Name"/>
<bag name="NameChanges"> <!--WRONG-->
<composite-element class="NameChange">
<property name="ExName"/>
</composite-element>
</bag>
</composite-element>
</bag>
</class>
But NH doesnt allow such mapping.
How to map collection of value objects inside value object?