I think I have tried every thing to get this to work but to no avail. Any hints/help much appreciated.
The following parent-children relationship causes the following error on creation of the parent.
could not insert: [Kanpeki.Domain.CalEvtCatergory][SQL: INSERT INTO tb_calEvent_catergory (catergoryID, parentID, catergoryType, catergoryLabel, id) VALUES (?, ?, ?, ?, ?)]
The 2 object mappings are as follows:
Parent = CalEvent
<id name="id" column="id">
<generator class="hilo"/>
</id>
<bag name="catergories" table="tb_calEvent_catergory" lazy="false" cascade="all">
<key column="parentID" foreign-key="id"/>
<one-to-many class="CalEvtCatergory"/>
</bag>
Child = CalEvtCatergory
<class name="CalendarCatergory" table="tb_calendar_catergory" lazy="false" >
<id name="id" column="id">
<generator class="hilo"/>
</id>
<property name="parentID" />
snip....
It doesn't seem to be applying the (parentID) id of the calEvent to the CalendarCatergory