Joined: Fri Sep 02, 2005 12:47 pm Posts: 14 Location: muenchen
|
I use one-to-many mapping of parent child like structure. To store children objects it use list.
/parent/
<list name="array"
inverse="true"
cascade="all,delete-orphan">
<key column="PARENT_ID"/>
<list-index column="listnumber"/>
<one-to-many class="child"/>
</list>
/child/
<many-to-one
name="parent"
column="PARENT_ID"
class="parent"
not-null="true" />
The "listnumber" filed is not mapped in child.
The problem is that listnumber is saved always as a null into db so it can not recreate list object properly from db.
My intension was that position in the list transvers into listnumber value and vice versa.
I belive I missing smth on the child side. Can be that listnumber has to be mapped as a key.
Sincerely,
Pawel
|
|