On 27 August 2011 20:43, Fran Knebels <[email protected]> wrote:

> To me the database seems to be wrong.
>
> If a contact can only exist for a single customer, then there shouldnt be a
> many to many, but a many to one.
>
> So you'd have customer and contacts and a foreign back to customer from the
> contacts table.  Is there addition information oh are capturing in the
> customercontacts table?
>

I changed and it's ok now :

<set name="Contacts"
     table="CustomerContact"
     inverse="true"
     cascade="all-delete-orphan" >

    <key column="Customer" />
    <one-to-many class="Contact" />
</set>

<many-to-one name="Customer" column="Customer" />

-- 
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