Thanks first of all.... I have specified
"inverse" = true in the parent object "zInventory":
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="warehouse.to.zInventory, WarehouseLib" table="zInventory">
<id name="Inv_ID" column="inv_id" type="Int32" unsaved-value="0" >
<generator class="identity" />
</id>
... bunch of properties...
<set name="Swatches" inverse="true" cascade="all" table="inv_swatches" lazy="false">
<key column="inv_id"/>
<one-to-many class="warehouse.to.inv_swatches, WarehouseLib"/>
</set>
</class>
</hibernate-mapping>
For my child object "Swatch":
Code:
Public Class inv_swatches
...
Public Property ParentInventoryMaster() As warehouse.to.zInventory
... getter and setter...
End Property
...
End Class
However, in my parent class, I have:
Code:
Public Class zInventory
...
Public Property Swatches() As Collections.ISet
... getters and setters...
End Property
...
End Class
Is this wrong then? What I did is:
(1). Get children from parent class
AND(2). Get parent from child class
I have this feeling from what you said you can ONLY do...
(1) if you specified
inverse=false OR (2) if you specified
inverse=trueFor your information, my child class mapping file:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="warehouse.to.inv_swatches, WarehouseLib" table="inv_swatches">
<id name="SwatchID" column="swatch_id" type="Int32" unsaved-value="0" >
<generator class="identity" />
</id>
<many-to-one name="ParentInventoryMaster" column="inv_id" class="warehouse.to.zInventory, WarehouseLib" not-null="true" />
... other stuff ...
</class>
</hibernate-mapping>
Is this the reason why I keep getting
"Row not found" on updates/deletes (as noted in my other post...
http://nhibernate.sourceforge.net/forum ... .php?t=644 )
Help!