• 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
deleting question again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

deleting question again


  • Subject: deleting question again
  • From: James Cicenia <email@hidden>
  • Date: Tue, 27 Jul 2010 11:44:28 -0500

Hello

I am using the following pattern. Upon creation of an object I also instantiate three related objects.
Upon saving, I then delete the related objects that have null data as so:

    if(att1.alertTarget()==null || att1.percentageOfAlert() == null ){
    currentMasterAlert.removeFromAlertThresholdTargetsRelationship(att1);
    currentMasterAlert.ctEditingContext().deleteObject(att1);
    att1  = null;
    }

Which throws the validation exception.

[2010-7-27 8:50:50 CDT] <WorkerThread7> Validation failed on an object [null] with keypath = att2.alertTarget and exception: The alertTarget property of AlertThresholdTarget must have a AlertTarget assigned
[2010-7-27 8:50:50 CDT] <WorkerThread7> Validation failed on an object [null] with keypath = att3.alertTarget and exception: The alertTarget property of AlertThresholdTarget must have a AlertTarget assigned

What am I missing here or doing that is making a validation rule affect the delete?

Thanks
James
 _______________________________________________
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: deleting question again
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Suggestions for best deployment?
  • Next by Date: Adaptor's Timeouts
  • Previous by thread: Re: Passing data to another component
  • Next by thread: Re: deleting question again
  • Index(es):
    • Date
    • Thread