• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Expanding Import
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expanding Import


  • Subject: Re: Expanding Import
  • From: Anjo Krank <email@hidden>
  • Date: Tue, 7 Mar 2006 23:38:32 +0100


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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Expanding Import
      • From: Scott Winn <email@hidden>
References: 
 >Expanding Import (From: Scott Winn <email@hidden>)
 >Re: Expanding Import (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: java.lang.outofmemory
  • Next by Date: Re: Expanding Import
  • Previous by thread: Re: Expanding Import
  • Next by thread: Re: Expanding Import
  • Index(es):
    • Date
    • Thread