Am 07.03.2006 um 23:20 schrieb Chuck Hill:


And the big question. . .
3) How do I check the database for an Entity and relate an object to it when there are potentially a million other objects related to it?

I think, in a round about way, you have identified the problem. I will hazard a guess that in your model you have a Certificate ->> Stations. So as you add a certificate to a station, this reverse relationship grows ever larger. The solution, is to not include this relationship in your model or to not make it a class property. In most cases like this, you really don't need this relationship or seldom need it. In this case you can mimic it by fetching the related objects when needed.

This happens because when you save, all the relations will get takeValueForKey(valueForKey(x), x)'ed, reading all the records in. The simplest solution - short of disabling the relationship in the model - is to create a DBC-delegate that returns NSArray.EmptyArray on dbcShouldFetchObjects() when the items of this destination entity are involved.

Cheers, Anjo
_______________________________________________
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