Here you have another explanation about the inverse option.
http://simoes.org/docs/hibernate-2.1/155.html

On Sat, Sep 13, 2008 at 12:36 PM, codemonkey <[EMAIL PROTECTED]>wrote:

>
> No worries, mappings below:
>
> <?xml version="1.0" encoding="utf-8"?>
> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
>  <class name="A" table="A" lazy="false">
>    <id name="Id" column="ID" type="int">
>      <generator class="native" />
>    </id>
>    <property name="Name" column="Name" type="string" />
>    <set name="BItems" inverse="true" lazy="true" cascade="delete-
> orphan">
>      <key column="AId" />
>      <one-to-many class="B" />
>    </set>
>  </class>
> </hibernate-mapping>
>
> <?xml version="1.0" encoding="utf-8"?>
> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
>  <class name="B" table="B" lazy="false">
>    <id name="Id" column="ID" type="int">
>      <generator class="native" />
>    </id>
>        <property name="Name" column="Name" type="string" />
>    <many-to-one name="A" column="AId" cascade="save-update" not-
> null="true" />
>  </class>
> </hibernate-mapping>
>


-- 
Dario Quintana
http://darioquintana.com.ar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to