• 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: Help with ERXBatchFetchUtilities.batchFetch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with ERXBatchFetchUtilities.batchFetch


  • Subject: Re: Help with ERXBatchFetchUtilities.batchFetch
  • From: Paula Loehr <email@hidden>
  • Date: Fri, 17 Sep 2010 14:40:45 -0600
  • Thread-topic: Help with ERXBatchFetchUtilities.batchFetch

Title: Re: Help with ERXBatchFetchUtilities.batchFetch



On 9/17/10 2:35 PM, "Chuck Hill" <email@hidden> wrote:

>
> On Sep 17, 2010, at 1:24 PM, Paula Loehr wrote:
>
>> Hi,
>> This is my first time to post a question to this list, so let me know if I’m
>> not providing enough information.
>>
>>
>> Here’s my problem:
>> I’m calculating students’ gpas so I can then get a student’s class rank.
>> I have one “if” statement that is still causing database hits:    if
>> (this.studentCourse().course().isHighschool()) {
>
> What is "this"?
"this" is  one of "transcript.terms.courses"
>
>>
>> Because there could be hundreds of gpas that I’m calculating, I need to
>> eliminate all database hits during my calculation or it will take too long.
>>
>> I’ve added the following batchFetch to try to eliminate these database hits
>> and it’s not quite working yet. It’s working for some of the keyPaths, but
>> not all.
>>        ERXBatchFetchUtilities.batchFetch(students, new
>>                NSArray<String> (new String [] {
>>                         "transcript",                                           
>> <---- this one works     
>>                         "finalTranscript",                                      
>> <---- this one works
>>                         "transcript.student",
>>                         "transcript.student.schoolStudents",
>>                         "transcript.terms",                                     
>> <---- this one works
>>                         "transcript.terms.courses",                             
>> <---- this one works
>>                         "transcript.terms.courses.studentCourse",
>>                         "transcript.terms.courses.studentCourse.course"
>
>
> transcript.terms.courses.studentCourse.course matches
> this.studentCourse().course() above?
>
> Yes, it does.
>
> Chuck
>
>
>> }));
>>
>> Here are the relationships:
>> transcipt > student >> schoolStudents
>> transcript >> terms >> courses > studentCourse > course
>>
>> Here is the data it’s fetching:
>> transcript : 44 rows (correct)
>> finalTranscript : I don’t see any SQL generated for this fetch
>> transcript.student : or this one  (there should be 44)
>> transcript.student.schoolStudents : or this one  (there should be 44, it’s a
>> one to many, but it just so happens, that there’s 1 schoolStudent record for
>> each  
>>                                                   student in this case)
>> transcript.terms : 131 rows (correct)
>> transcript.terms.courses : 1048 (correct)
>> transcript.terms.courses.studentCourse  : I don’t see any SQL for this one
>> either
>> transcript.terms.courses.studentCourse.course : or this one
>>
>>
>> I’ve tried variations of the batchFetch statement and tried setting the
>> skipFaultedSourceObjects to true and false, but I always have the same
>> result.
>>
>> Any ideas?
>>
>> Thanks in advance,
>> Paula
>>
>>
>>
>> --
>> Paula Loehr
>>
>> K12 Inc
>> 719-460-4350
>> email@hidden
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> net
>>
>> This email sent to email@hidden

--
Paula Loehr

K12 Inc
719-460-4350
email@hidden

 _______________________________________________
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: Help with ERXBatchFetchUtilities.batchFetch
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Help with ERXBatchFetchUtilities.batchFetch (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Help with ERXBatchFetchUtilities.batchFetch
  • Next by Date: ERPPieChart pie piece color
  • Previous by thread: Re: Help with ERXBatchFetchUtilities.batchFetch
  • Next by thread: Re: Help with ERXBatchFetchUtilities.batchFetch
  • Index(es):
    • Date
    • Thread