• 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: editingContext.deleteObject(object) immediately destroys relationships?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: editingContext.deleteObject(object) immediately destroys relationships?


  • Subject: Re: editingContext.deleteObject(object) immediately destroys relationships?
  • From: Chuck Hill <email@hidden>
  • Date: Sun, 8 Apr 2007 17:59:59 -0700

Hi Miguel,


On Apr 8, 2007, at 5:49 PM, Miguel Arroz wrote:

I'm having a very very strange bug here.

I have a context where I store some objects but I do not save it yet. Specifically I have one object that was created, and has relationships with other objects, but it's still not stored on the DB.

Depending on what the user does, that object may be deleted again (before it's saved to DB).

The problem is that after deleting it, apparently it's still showing up on some relationships. IE, object A is related to B. I delete B, but A still has B in it's b() array. Is this normal?

Yes.


Even more strange, after a page reload (again, with no context saving) it apparently disappears from A's b() array.

Also normal. ;-)


What the heck is happening here?

EOEditingContext.processRecentChanges() is what is going on. This gets called at the end of the RR loop, IIRC. I don't recall how it gets called, a notification, I think.



Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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


References: 
 >editingContext.deleteObject(object) immediately destroys relationships? (From: Miguel Arroz <email@hidden>)

  • Prev by Date: editingContext.deleteObject(object) immediately destroys relationships?
  • Next by Date: Re: pageWithName
  • Previous by thread: editingContext.deleteObject(object) immediately destroys relationships?
  • Next by thread: Re: editingContext.deleteObject(object) immediately destroys relationships?
  • Index(es):
    • Date
    • Thread