On 9/17/10 2:35 PM, "Chuck Hill" <[email protected]> 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 protected] >> >> _______________________________________________ >> 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/chill%40global-village. >> net >> >> This email sent to [email protected] -- Paula Loehr K12 Inc 719-460-4350 [email protected]
_______________________________________________ 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]
