Hibernate version: SVN
This mapping work fine
Code:
<class name="A" table="tabA">
<id name="Id" type="Int32">
<generator class="native" />
</id>
<list name="Elements" cascade="all">
<key column="parentId" />
<index column="childNum"/>
<one-to-many class="B" />
</list>
</class>
<class name="B" table="tabB">
<id name="Id" type="Int32">
<generator class="native" />
</id>
<property name="Name"/>
</class>
This other don't work
Code:
<class name="A" table="tabA">
<id name="Id" type="Int32">
<generator class="native" />
</id>
<list name="Elements" inverse="true" cascade="all">
<key column="parentId" />
<index column="childNum"/>
<one-to-many class="B" />
</list>
</class>
<class name="B" table="tabB">
<id name="Id" type="Int32">
<generator class="native" />
</id>
<many-to-one name="Parent" class="A" column="parentId"/>
<property name="Name"/>
</class>
The problem is that the childNum column is always NULL.
Is there some special issue for this beaviour ?
Thanks.