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.

Sounds like a good solution, but being very new to WebObjects I have no idea how to go about doing that. I am using multiple editing contexts to store and save imported records as I go along, but I have never ventured deeper into the data store process than that. Can anyone show me how to selectively ignore certain relationship values like Anjo described using databaseContextShouldFetchObjects() ?

Thanks again,

Scott
_______________________________________________
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