Quote:
1. InstructionLine can have:
-multiple parents
-multiple childrens
Right..because I parent may be a child of another parent..
Quote:
2. According your db schema each InstructionLine can have:
- one parent
- one child
With this db design it is possible to store multiple parents and children...right..??
My mapping looks like:
Code:
<hibernate-mapping package="com.brainscript.tangram.sales.despatchorder.domain.impl">
<class name="BaseDespatchOrderLines" table="inventory.despatch_order_lines">
<id name="id" column="id" unsaved-value="null">
<generator class="sequence">
<param name="sequence">inventory.instruction_lines_id_seq</param>
</generator>
</id>
<property name="comments" column="comments"/>
<property name="item" column="item_id"/>
//Is this possible
<!-- <bag name="children" cascade="all-delete-orphan" lazy="false" table="inventory.instruction_hierarchy">
<key column="id" not-null="true"/>
<one-to-many class="com.brainscript.tangram.sales.salesorder.domain.impl.InstructionLine"/>
</bag>-->
</class>
</hibernate-mapping>