• 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: refreshing and relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: refreshing and relationships


  • Subject: Re: refreshing and relationships
  • From: Tom Woteki <email@hidden>
  • Date: Sun, 15 Jan 2006 14:16:05 -0500

That doesn't seem to work. I tried it before and/or after the call to deleteObject and in conjunction with invoking refreshObject on the owning sourceObj. No combination seems to work.

Thanks
Tom

On Jan 15, 2006, at 1:29 PM, Arturo Pérez wrote:

On Jan 15, 2006, at 12:33 PM, Tom Woteki wrote:

I have a source object, sourceObj, with a to-many relationship. Say the relationship key is "targets" . I obtain the related objects by invoking sourceObj.targets() where the method targets() returns an NSArray as a cover for a call to storedValueForKey ( "targets" ).

I now invoke:

/* Assume editingContext exists and all EOs are in it */
editingContext.deleteObject( aSpecificTargetObject )


You also need to do a removeObjectFromBothSidesOfRelationshipWithKey. If the sourceObj "owns" the deleted object that's all you have to do.


-arturo


_______________________________________________ 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: refreshing and relationships
      • From: Dev WO <email@hidden>
References: 
 >refreshing and relationships (From: Tom Woteki <email@hidden>)
 >Re: refreshing and relationships (From: Arturo Pérez <email@hidden>)

  • Prev by Date: Re: refreshing and relationships
  • Next by Date: Re: refreshing and relationships
  • Previous by thread: Re: refreshing and relationships
  • Next by thread: Re: refreshing and relationships
  • Index(es):
    • Date
    • Thread