On Sun, Aug 28, 2011 at 1:32 AM, Kris-I <[email protected]> wrote:

> For me it's normal, a Customer can have several Contact and a contact is
> link to one Customer. If the mapping it's not correct for you ... tell me
> how correct this.
>
> But I need this :
> - A Customer can have several Contact
> - When I delete a Customer the Contact must be deleted too.



Actually that implies you want a one-to-many relationship from Customer to
Contact, instead of many-to-many.

Please show your Contact class and CustomerContact table data structure.




-- 
Regards,

Maximilian Haru Raditya






On Sun, Aug 28, 2011 at 1:32 AM, Kris-I <[email protected]> wrote:

> For me it's normal, a Customer can have several Contact and a contact is
> link to one Customer. If the mapping it's not correct for you ... tell me
> how correct this.
>
> But I need this :
> - A Customer can have several Contact
> - When I delete a Customer the Contact must be deleted too.
>
> Regards,
>
>
> On 27 August 2011 18:20, Oskar Berggren <[email protected]> wrote:
>
>> First you say it's many-to-many. Then you say what when one side is
>> deleted, the other should be deleted too, which is weird in
>> many-to-many since there could be other references.
>>
>> In Customer you indeed have a many-to-many mapping, but in Contact you
>> have a many-to-one mapping back to Customer. Why?
>> And you have the relation table CustomerContact, and yet the Contact
>> also has a direct reference to Customer. Why?
>>
>
>  --
> 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.
>

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