[V4RB] ? about cascade deletion and many to many relationship

Claudius Sailer Claudius at sailer-online.de
Thu Feb 6 19:37:15 CST 2003


Am Donnerstag, 06.02.03 um 19:18 Uhr schrieb Kevin Windham:

> Say I have a link table  t12 with t1.ptr and t2.ptr so I have a many 
> to many relation between t1 and t2.
>
> Now when I delete a record  t1 I want the associated link records in 
> t12 to be deleted, but I don't want the associated records in t2 to be 
> deleted.
>
> If I understand the Cascade option correctly, it will delete records 
> in t2 also. Is that correct, and if so how would I go about handling 
> this situation? If I am wrong, can someone tell me how to set up the 
> deletion properly.

I would say now.

You define in t12

kv_Cascade


in t2

kv_SetNull


then in t12 the records will be deleted in t2 the field in the records 
will be set to null.
The delete-functionality tells the relation by itself how it should act 
when the BasisRecords is deleted

bye


Claudius



More information about the Valentina mailing list