• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem removing/deleting all related objects.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Problem removing/deleting all related objects.
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: WebObjects 5.3.3, DST and J2SE 1.4.2
  • Next by Date: Re: Problem removing/deleting all related objects.
  • Previous by thread: Re: Single sign on in multiple WOApps / passing parameters between apps
  • Next by thread: Re: Problem removing/deleting all related objects.
  • Index(es):
    • Date
    • Thread