Sounds like the display group qualifier is applied after the fetch.  Since it 
only fetched the original objects, it has to fault the relationships to filter 
them with the qualifier and does so one at a time.

On Dec 14, 2012, at 5:08 PM, Joe Kramer wrote:

> Weird... putting it in it's own class file works just fine. Turns out it was 
> not my qualifier, but something to do with the way I am using an 
> ERXDisplayGroup.
> 
> I have this code in my search method:
> displayGroup().setQualifier(qual);
> displayGroup().fetch();
> 
>     public ERXDisplayGroup<Person> displayGroup() {
>         if (displayGroup == null) {
>             EODatabaseDataSource dataSource = new EODatabaseDataSource(
>                     session().defaultEditingContext(), 
>                     Person.ENTITY_NAME);
> 
>             displayGroup = new ERXDisplayGroup<Person>();
>             displayGroup.setDataSource(dataSource);
>             displayGroup.setNumberOfObjectsPerBatch(10);
>             displayGroup.setSortOrderings(Person.LAST_NAME.ascInsensitives());
>         }
>         return displayGroup;
>     }
> 
> If I change the code in the search method to:
> displayGroup().setObjectArray(Person.fetchPersons(ec, qual, null));
> 
> everything works as fast as I would expect. Anyone have insights into why the 
> way I was trying to use ERXDisplayGroup was so slow?
> 
> Thanks,
> 
> Joe
> 
> 
> On Fri, Dec 14, 2012 at 3:38 PM, Ramsey Gurley <[email protected]> 
> wrote:
> Uhhh, bizarre
> 
>> IllegalArgumentException: <NSSelector> method is not public: public 
>> com.webobjects.foundation.NSArray
> 
> :D  Looks public to me.  
> 
> Try making the delegate an actual class in its own java file then.
> 
> Ramsey
> 
> On Dec 14, 2012, at 4:26 PM, Joe Kramer wrote:
> 
>> Hi Ramsey,
>> 
>> Adding that code I get the following stack. Did I miss anything?
>> 
>> IllegalArgumentException: <NSSelector> method is not public: public 
>> com.webobjects.foundation.NSArray 
>> com.example.app.Application$1.editingContextShouldFetchObjects(com.webobjects.eocontrol.EOEditingContext,com.webobjects.eocontrol.EOFetchSpecification)
>> Class com.webobjects.foundation.NSSelector can not access a member of class 
>> com.example.app.Application$1 with modifiers "public"
>>   at 
>> com.webobjects.foundation.NSSelector._safeInvokeMethod(NSSelector.java:126)
>>   at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223)
>>   at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163)
>>   at 
>> com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4064)
>>   at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1231)
>>      ... skipped 1 stack elements
>>   at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132)
>>   at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:125)
>>   at 
>> er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:452)
>>   at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:552)
>>   ... skipped 16 stack elements
>> 
>> On Fri, Dec 14, 2012 at 3:02 PM, Ramsey Gurley <[email protected]> 
>> wrote:
>> editingContextShouldFetchObjects
>> 
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to