Problem removing/deleting all related objects.
Problem removing/deleting all related objects.
- Subject: Problem removing/deleting all related objects.
- From: David Avendasora <email@hidden>
- Date: Tue, 6 Mar 2007 17:31:31 -0500
Hi all,
What could I be doing wrong that when I execute the following method
that it only deletes half of the relationships? It alternates,
deleting one, skipping one, deleting one, skipping one, and so on....
I have a component with a submit button that calls the
deleteAllScheduledBatchesRelationships() method.
public void deleteAllScheduledBatchesRelationships() {
Enumeration objects = scheduledBatches().objectEnumerator();
while ( objects.hasMoreElements() )
deleteScheduledBatchesRelationship((ScheduledBatch)
objects.nextElement());
}
public void deleteScheduledBatchesRelationship(ScheduledBatch
object) {
removeObjectFromBothSidesOfRelationshipWithKey(object,
"scheduledBatches");
}
If I call this enough times, I'll get down to 1 relationship left,
which it won't delete.
I'm sure it is something VERY basic, but I just can't figure out what
it is.
Thanks!
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden