Thank you Chuck and Mike for your thoughts on this rather scary issue.

I will try to free up some cycles to build a "reduction" or "test case", 
but probably not today. Assuming I could make a reproducible and simple 
reduction, anyone know what Database Apple would most likely like to see? 
I'm assuming I might need to use "Derby", which I've never done before and 
would be a learning project in itself.

Mike, thanks for the tip that WOnder's EC already might have Lenny's fix. 
I'll look at that and see how it is implemented and if and where it might 
be different. Also thank you too Chuck for releasing the 
"DeletePrefetcher" code.

The reason Lenny's fix scares me a bit is because it works by postponing 
responding to notifications during a save changes until after the save 
changes completes. While indeed elegant, it's possible that some of those 
notifications could be necessary to respond to and detremental if they 
don't get to speak their piece. Furthermore, applying those notifications 
after the saveChanges could cause unwanted behvior too... espeically if it 
is related to an eo whose deletion has already been committed to the 
database and no longer has an EC associated with it. At a gut level, 
that's what bothers me.

While Chuck calls his solution "brutal" it seems like it could be the 
better solution. For one thing, the extra logic only kicks in at the 
moment you call ec.deleteObject(). So even though it is doing extra work, 
it is only doing it at that moment. In that sense, it is less brutal than 
Lenny's solution which does extra logic at every ec.saveChanges(). 
Additionally, it appears that Chucks code is just basically prefetching 
various faults which should be a benign thing to do. It may cause a few 
more round trips to the database but it feels "normal". 

Since I've worked on a number of apps over the years and have just run 
into this situation now, I suspect the truth lies somewhere in the middle 
between this being an Apple bug and a user bug. I bet there is something 
in our EOModels or the way we go about our business that is somehow 
"non-standard" and is confusing EOF. Granted, a deleted object should 
never get moved into the updated bucket... and likewise an updated object 
that is then marked as deleted should stay in the deleted bucket... that 
bit does seem like an Apple bug. But, we might be doing something that 
could be avoided, and might be unwise to begin with, that would alleviate 
the problems without resorting to work arounds.

Thanks to all,
-- Aaron

Chuck Hill wrote on 05-08-2008 08:42:12 PM:


> 
> File a bug!  If you can make a minimal reproduction test case, that 
> will help enormously.
> 
> 
> 
> Chuck
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to