Re: EOQualifier issue
Re: EOQualifier issue
- Subject: Re: EOQualifier issue
- From: Art Isbell <email@hidden>
- Date: Fri, 24 Nov 2006 11:08:00 -1000
On Nov 24, 2006, at 2:13 AM, Fabrice Pipart wrote: Unfortunately I tested this and this results in the same issue I pointed earlier. I did not check the SQL generated in that case but I guess its the same since it does not work either :-(
I have found that leaving SQL logging on during the entire development process and carefully checking the generated SQL can identify inefficient SQL that can be performance-robbing. A common problem is multiple single-object fetches that could be combined into a single efficient fetch by batch fetching. Another problem is large fetches triggered by an inverse relationship in one's eomodel that is unnecessarily labeled as a class property. The only solution I found was to do two separate ec.objectsWithFetchSpecification(fs); with each qualifier and then sorting and removing duplicates by hand in Java.
If you want to remove duplicates, just add your fetched arrays to an NSSet object, get the result array from this NSSet, and then get a sorted array in memory using EOSortOrdering.sortedArrayUsingKeyOrderArray().
|
_______________________________________________
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