This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - "Bulk" delete with AML?

chado - Saturday, August 13, 2011 12:52 PM:

I'm working on cascading deletes of relationships to related Items (and relationship chains). I would like to be able to delete using AML, based on some criteria other than id.

e.g.

<AML>

   <Item type="someItem"  action="delete" where=" id IN (select...)>

     ..

or

<AML>

   <Item type="someItem"  action="delete">

   <source_id>[some known id]</source_id>

....

It seems that without providing a value for the id attribute, I get missing criteria exceptions no matter what I do. So is AML designed to only allow deletion of one Item at a time?

The "easy fix" is to use applySQL(..), but I am assuming that will circumvent the event model (verification of this notion would be appreciated), which is unacceptable.

 

So is this a semantics problem on my end, or are we forced to iterate, deleting one Item at a time? Framework client-server traffic is already very high, and we always worry about degrading performance further.

 

Any advice would be appreciated.