Re: EOQualifier and to-many relationships
Re: EOQualifier and to-many relationships
- Subject: Re: EOQualifier and to-many relationships
- From: Ramsey Gurley <email@hidden>
- Date: Fri, 14 Dec 2012 17:24:52 -0700
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
|
_______________________________________________
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