Hi,

My parent class has two collection properties that hold entities of
the same type. I'm trying to understand the correct way to map this.
Using the example from the docs:

<class name="Parent">
    <set name="Children1" inverse="true" cascade="all-delete-orphan">
        <key column="parent_id"/>
        <one-to-many class="Child"/>
    </set>
    <set name="Children2" inverse="true" cascade="all-delete-orphan">
        <key column="parent_id"/>
        <one-to-many class="Child"/>
    </set>
</class>

<class name="Child">
    <many-to-one name="Parent" column="parent_id" not-null="true"/>
</class>

This obviously will not work because there's no way to tell which
parent collection a child belongs to. How do I map this?

TIA
v64


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to