Query on removeRelated()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Query on removeRelated()

Pratibha Bhat-2

Hi,

1>>>
I have a entities A,B & C
A-->B--> C
C is child of b and b is child of A

If I want to remove any entry from entity A(table corresponding to
entity A), I need to remove related entries from B also else exception
is thrown.
I can use removeRelated() api of GenericValue.
But if B has some related entries in C, again exceptions are thrown.
How to handle such situation?

Do I need to manually check and delete one by one or is there any easy
way?


2>>>>
How can we specify CASCADE delet option while defining entity?

Kindly someone help me sorting this out.

Thanks and regards,
Pratibha


============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.


Disclaimer:


The contents of this E-mail (including the contents of the enclosure(s) or attachment(s) if any) are privileged and confidential material of Tech Mahindra and should not be disclosed to, used by or copied in any manner by anyone other than the intended addressee(s). In case you are not the desired addressee, you should delete this message and/or re-direct it to the sender. The views expressed in this E-mail message (including the enclosure(s) or attachment(s) if any) are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Tech Mahindra.


This e-mail message including attachment/(s), if any, is believed to be free of any virus. However, it is the responsibility of the recipient to ensure that it is virus free and Tech Mahindra is not responsible for any loss or damage arising in any way from its use.

============================================================================================================================
Reply | Threaded
Open this post in threaded view
|

Re: Query on removeRelated()

Andrew Sykes
Pratibha,

Perhaps you could use an ECA for this?
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com