• 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
Objects marked for delete fall into the updated objects bucket in processRecentChanges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objects marked for delete fall into the updated objects bucket in processRecentChanges


  • Subject: Objects marked for delete fall into the updated objects bucket in processRecentChanges
  • From: email@hidden
  • Date: Mon, 4 Aug 2008 11:21:53 -0400


Hello WOrriors,

We're using WO 5.3.x (not 5.4.x)

I've run into a pickle where if I do an ec.deleteObject() and then call ec.saveChanges() I find that this fails during a "validateFor*Save*". Curious, indeed, because it should only call "validateFor*Delete*". When asking the EC to delete the Object, it breaks various mandatory relationships. This, in itself, is ok because the object is about to go "bye-bye" and is akin to setting a variable to null so you don't accidentally try to reference it anymore. Problem is, the object is mysteriously being dropped into the "updatedObjects" bucket during "processRecentChanges()"... this is what kicks off the validateForSave which of course fails because mandatory relationships are purposely broken.

Even more of interest is that this strange transfer from "deleted -> updated" status only happens in certain repeatable circumstances. It happens when you:

1) On _page A_ in _EC 1_ *edit a value in the desired EO and save*
2) then go to a different _page B_ with _EC 2_ but pass the EO as a local object of the new EC
3) Attempt to delete and save the local EO in _EC 2_ on _page B_.

The above will happen every time. However, if I repeat those above steps but "do not edit the EO" in step 1, then everything goes according to plan and the object actually deletes.

This is all on my local machine in dev mode with DirectConnect. Nothing funny with multiple concurrent access. Strangely, if I step into ec.saveChanges() and then ec.processRecentChanges() and step a bit there then hit "continue" in the debugger... the marked for delete object *stays* in the delete bucket and deletes as desired. So odd! It's as if there is a concurrent process going on in processRecentChanges that if tripped at the right time, maybe a deferred fault (or something) gets fired and causes an object to move from the deleted -> updated bucket.

I've searched a bit on the listserv archives and have seen some notable people have had similar issues in the past. For example this posting between Lenny, Chuck, and Christian:

http://www.mail-archive.com/email@hidden/msg04553.html

I've tried the code fix to EOEditingContext offered here and found that it stops the Validation Error but doesn't actually delete the desired EO either.

If anyone has any insight on this issue I'm all ears and appreciate your thoughts and concern. Anything like:

1) Is this a confirmed bug by Apple that might be fixed in WO 5.4 or at least has an open Radar ticket?

2) Is there possibly something similar that has bit you that you think I also might be doing wrong and overlooking?

3) Have other peoople used Lenny's fix and had any other thoughts or tweaks?

Thanks in advance,
-- Aaron
 _______________________________________________
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: Objects marked for delete fall into the updated objects bucket in processRecentChanges
      • From: Chuck Hill <email@hidden>
    • Re: Objects marked for delete fall into the updated objects bucket in processRecentChanges
      • From: Kieran Kelleher <email@hidden>
  • Prev by Date: JUnit and Classpath
  • Next by Date: ERXEC question
  • Previous by thread: Re: JUnit and Classpath
  • Next by thread: Re: Objects marked for delete fall into the updated objects bucket in processRecentChanges
  • Index(es):
    • Date
    • Thread