• 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
Can't delete parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't delete parent


  • Subject: Can't delete parent
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Thu, 25 Mar 2010 19:34:59 -0400

Hi All,

I have a couple of entities setup like this:

Foo <-->> FooItem

The "items" to-many has owns destination checked and a delete rule of cascade.  Then the "foo" to-one in the FooItem entity that points back to the parent is set to nullify.

Why then when I do this:

aFoo.delete();
ec.saveChanges();

I get a a validation exception like this:

ERXValidationException: A <b>Foo Item</b> must have a <b>Foo</b>.
  at com.webobjects.eoaccess.EORelationship.validateValue(EORelationship.java:1860)
  at com.webobjects.eoaccess.EOEntityClassDescription.validateValueForKey(EOEntityClassDescription.java:456)
  at er.extensions.eof.ERXEntityClassDescription.validateValueForKey(ERXEntityClassDescription.java:814)
  at com.webobjects.eocontrol.EOCustomObject.validateValueForKey(EOCustomObject.java:1311)
  at er.extensions.eof.ERXGenericRecord.validateValueForKey(ERXGenericRecord.java:1248)
  at com.webobjects.eocontrol.EOCustomObject.validateForSave(EOCustomObject.java:1381)
  at er.extensions.eof.ERXGenericRecord.validateForSave(ERXGenericRecord.java:1299)
  at com.webobjects.eocontrol.EOCustomObject.validateForUpdate(EOCustomObject.java:1446)
  at er.extensions.eof.ERXGenericRecord.validateForUpdate(ERXGenericRecord.java:1338)
  at com.webobjects.eocontrol.EOEditingContext.validateTable(EOEditingContext.java:2271)
  at com.webobjects.eocontrol.EOEditingContext.validateChangesForSave(EOEditingContext.java:3020)
  at com.webobjects.eocontrol.EOEditingContext._prepareForPushChanges(EOEditingContext.java:3249)
  at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3179)
  at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:1085)
  at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:1007)
  at com.mpv.webcomponents.MPVWOComponent.saveChanges(MPVWOComponent.java:233)
  at com.mpv.reportcomponents.ReportPublishDelete.delete(ReportPublishDelete.java:80)
  ... skipped 83 stack elements

these are some objects I converted recently to use the eo gap generation pattern.  I'm looking through my code and I can't yet find anything that would cause this.  The entities seem to be setup right.  But things are just not behaving as expected.

Any ideas where to look?


Thanks
Ricardo


 _______________________________________________
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: Can't delete parent
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Bug in WO5.4.3? (was: Snapshots mysteriously vanishing?)
  • Next by Date: Re: Can't delete parent
  • Previous by thread: Re: Axis javax.xml.rpc.service.endpoint.address null
  • Next by thread: Re: Can't delete parent
  • Index(es):
    • Date
    • Thread