Re: SharedEditingContext Write Locks?
Re: SharedEditingContext Write Locks?
- Subject: Re: SharedEditingContext Write Locks?
- From: Ian Joyner <email@hidden>
- Date: Thu, 17 Nov 2005 15:17:19 +1100
On 17/11/2005, at 10:45 AM, Ben Trumbull wrote: K.
Here's the secret:
EOSharedEditingContexts are NOT EOEditingContexts.
That's a great secret because the EOSharedEditingContext doc says:
Class EOSharedEditingContext com.webobjects.eocontrol.EOObjectStore com.webobjects.eocontrol.EOEditingContext com.webobjects.eocontrol.EOSharedEditingContext
so EOSharedEditingContext inherits from EOEditingContext and therefore 'is a' EOSharedEditingContext.
I have not had a great deal of luck trying to share read-only entities in a shared context, so perhaps what you are saying is right. If you can't use a shared editing context anywhere you might have an editing context then this design is wrong. If EOSharedEditingContext cannot fulfill the contracts of EOEditingContext (ie do at least as much as and more than) then inheritance should not be used. If they share some behaviour but not all, that behaviour should be in a common parent class (something languages without multiple inheritance make difficult to reap the full benefits of factorizing common behaviours into small classes).
Anyone care to explain?
Thanks Ian
|
_______________________________________________
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