Cascade behavour on delete

Hi,

I use Visual Paradigm SDE for Eclipse.
I created a class, which has an m:n self association. It is an ORM Persistable class. The SDE generated the attached table structure for the class (it is good).
Under my tests I created one parent and two children. I added the children to the parent, and at the end of the test deleted one of the children.

SystemEntityDAO.delete(child1);

But the result was all of the entities (both parent and children) was deleted.
After that tried to set the cascade behavour of the the connection to set “No action” (as you can see on the second attached picture), but no progress. Everything were deleted.
Could you help me what else should I have to change or set? Could you give me detailed explaination about red lined part of the attached windows? (What do “Cascade, Set Null, Set Default, Restrict, No Action”?)

Thanks,
Bela

table.JPG


behavour.JPG

Hi Bela Kovacs,

Thanks for your post. Could you tell me what database are you using? Thanks!

Best regards,
Lilian Wong

[quote=LilianWong]Hi Bela Kovacs,

Thanks for your post. Could you tell me what database are you using? Thanks!

Best regards,
Lilian Wong[/quote]

Apache Derby 10.3.2.1

Hi Bela Kovacs,

Thanks for your reply. We’ve tried to repeat your problem but without success. Would you mind sending me your eclipse project for further investigation? The project can be found inside the eclipse workspace, please compress the entire project folder and send it to me. Thanks in advance!

*If you do not want your files to be accessed by public, please send your projects to lilian@visual-paradigm.com or through my private message.

Best regards,
Lilian Wong

Hi Bela Kovacs,

I would like to follow-up the entities deleted issue. Was the problem solved?
If not, would you mind sending me your eclipse project for further investigation? Thanks in advance!

*If you do not want your files to be accessed by public, please send your projects to lilian@visual-paradigm.com or through my private message.

Best regards,
Lilian Wong