Re: Relationship across model boundaries failing
Re: Relationship across model boundaries failing
- Subject: Re: Relationship across model boundaries failing
- From: Lachlan Deck <email@hidden>
- Date: Sun, 1 Jun 2008 19:39:22 +1000
On 31/05/2008, at 11:39 AM, Mike Schrag wrote:
Now I'm just going to have to go look into fixing this in Wonder.
How much effort is expended being scared of inverse faulting (which
is a problem that seems like it really shouldn't be all THAT hard
to fix with a little elbow grease)?
It will definitely take a little more magic to pull off completely
and testing to see what the side-effects will be, but I have a
prototype that shows this is pretty straightforward to do. The one
catch is that includeObjectsInPropertyWithKey (or whatever that
method is) does a containsObject(..) call before adding. To answer
that question you have to fault the array. However, it appears to
work OK if I just make that assume false if it's not faulted at that
point. The downside of that is that willChange is called even
though once the array is eventually faulted, it may turn out that it
DIDN'T change (because it defers the uniqueness check until the
fault actually fires). So basically you get too many willChange
calls if you add duplicates to an unfaulted array. This doesn't
appear to actually be a problem in the limited testing I did,
though. Weekend time ...
Besides the above efforts which will of course be a step forward...
Would it make any sense to re-think the default model generation
strategy where every toMany is devoid of any qualifier?
e.g., if toMany's were left out of the model and instead generated as
follows (with some default implementation in the super class)...
public NSArray<EntityB> entityBs(EOQualfier qualifier);
... would this be any better?
with regards,
--
Lachlan Deck
_______________________________________________
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