• 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
Re: Owns Destination problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Owns Destination problem


  • Subject: Re: Owns Destination problem
  • From: David Avendasora <email@hidden>
  • Date: Tue, 19 Aug 2008 11:01:52 -0400

Oh, and another related (pun unavoidable) problem.

ScheduledRouting <->> ScheduledBatch, ScheduledRouting Owns ScheduledBatch, the delete rule is Cascade, and scheduledRouting is a required relationship in ScheduledBatch.

Yet when I delete a ScheduledRouting, I get the same validation error, only stating "the the scheduledRouting property of ScheduledBatch must have a ScheduledRouting assigned"

Ahg. Why are my delete rules and ownership settings being ignored?! I did go look at the .plist files and verified that they reflect what the settings are in the GUI, just to be sure.

Yes, it's required, but the object that is triggering the validation error should be long gone!

Dave

On Aug 19, 2008, at 10:37 AM, David Avendasora wrote:

Hi all,

This is very confusing, and I know it should be a very simple thing. I have a the following relationship that is marked as Owns Destination, 

ManufacturingSchedule <->> ScheduledRouting

When I remove the ScheduledRouting from the ManufacturingSchedule's scheduledRoutings() relationship by calling

    removeObjectFromBothSidesOfRelationshipWithKey(scheduledRoutingToDelete, "scheduledRoutings");

on the ManufacturingSchedule, the ScheduledRouting is not being deleted when I call editingContext().saveChanges(). Instead I'm getting a validation error:

[2008-08-19 09:44:57 EDT] <WorkerThread0> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
com.webobjects.foundation.NSValidation$ValidationException: The manufacturingSchedule property of ScheduledRouting must have a ManufacturingSchedule assigned
[2008-08-19 09:44:57 EDT] <WorkerThread0> com.webobjects.foundation.NSValidation$ValidationException: The manufacturingSchedule property of ScheduledRouting must have a ManufacturingSchedule assigned
at com.webobjects.eoaccess.EORelationship.validateValue(EORelationship.java:1805)
at com.webobjects.eoaccess.EOEntityClassDescription.validateValueForKey(EOEntityClassDescription.java:443)
at com.webobjects.eocontrol.EOCustomObject.validateValueForKey(EOCustomObject.java:1339)
at com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1411)
at com.webobjects.eocontrol.EOCustomObject.validateForInsert(EOCustomObject.java:1473)
at com.webobjects.eocontrol.EOEditingContext.validateTable(EOEditingContext.java:2249)
at com.webobjects.eocontrol.EOEditingContext.validateChangesForSave(EOEditingContext.java:3029)
at com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEditingContext.java:3283)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3213)

Why isn't it just deleting the ScheduledRouting object on save? All of ScheduledRouting's relationships are either Cascade or Nullify, so I know that it isn't being held onto because of a delete rule.

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: Owns Destination problem
      • From: David Avendasora <email@hidden>
References: 
 >Owns Destination problem (From: David Avendasora <email@hidden>)

  • Prev by Date: Owns Destination problem
  • Next by Date: Re: Owns Destination problem
  • Previous by thread: Owns Destination problem
  • Next by thread: Re: Owns Destination problem
  • Index(es):
    • Date
    • Thread