• 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: EOF being overly helpful.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF being overly helpful.


  • Subject: Re: EOF being overly helpful.
  • From: Art Isbell <email@hidden>
  • Date: Mon, 19 Sep 2005 16:21:17 -1000

On Sep 19, 2005, at 3:30 PM, Owen McKerrow wrote:

I have a table called Person which has a to-many relationship with a table PersonName, which is an optional relationship and Own's Desition is ticked and has a Batch Fault of 5.
The inverse relationship from PersonName to Person is to-one and mandatory.

I have a fetch spec in PersonName which I use to get a list names of members which are currently active.

Now this works fine, it retrives all the records I want in 1 hit.

However it then grabs all 167 people objects associated with these names, 1 AT A TIME !

So what am I doing wrong ? I understand EOF is trying to be helpful and grab the People objects for me but this time I don't want it to.

Then you'll probably need to set the Person.personNames relationship not to be a class property and remove the Person.personNames accessors from the Person class. Have you tried doing that? If you need to get a Person's personNames, you'll then need to fetch all PersonNames whose person relationship equals a particular Person rather than merely sending this Person a personNames () message.


In fact Im not even sure what's causing these faults to be fired.

EOF is probably trying to keep the object graph consistent with the database.


If I can't "turn it off" is there any way I can get it to do it all in one go instead of object by object.

You might be able to do this by setting the fetch spec to prefetch "person". But I'd try to eliminate the PersonName.person fetches, if possible.


Aloha,
Art

_______________________________________________
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


References: 
 >EOF being overly helpful. (From: Owen McKerrow <email@hidden>)

  • Prev by Date: EOF being overly helpful.
  • Next by Date: Re: EOF being overly helpful.
  • Previous by thread: EOF being overly helpful.
  • Next by thread: Re: EOF being overly helpful.
  • Index(es):
    • Date
    • Thread