Hi Samuel, I resolved my issue with NSSet beteewn two eofetchspec. I don't use internal procedure or custom SQL querry because it returns a dictionnary not an entity.
Ray Envoyé de mon iPad > Le 7 oct. 2013 à 17:51, Samuel Pelletier <sam...@samkar.com> a écrit : > > Hi Raynond, > > I do not think it is possible to specify UNION like that and the way the sql > are generated probably prohibit it. > > If your results are small, the easy way is to merge your results in memory: > > NSArray result = firstFetch(); > result.arrayByAddingObjectsFromArray(secondFetchInSameEntity); > result = ERXArrayUtilities.arrayWithoutDuplicates(result); > > If your result are bigger but not huge, you may try to use a Set to merge the > results by adding both results in the set and create an array with the > resulting set. By definition, Set does not allow duplicates. > > If you really need UNION in the database, you will need to use an internal > procedure or a custom SQL query. > > Samuel > > >> Le 2013-10-04 à 08:02, Raymond NANEON <rnan...@me.com> a écrit : >> >> The UNION is on the same EOEntity. >> >> Thanks >> Envoyé depuis iCloud >> >>> Le 04 oct. 2013 à 14:00, Raymond NANEON <rnan...@me.com> a écrit : >>> >>> Hi List, >>> >>> I want to use UNION in two EOFetch but I don't know how to do it. >>> >>> Thanks for your help. >>> Envoyé depuis iCloud >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >>> Help/Unsubscribe/Update your Subscription: >>> https://lists.apple.com/mailman/options/webobjects-dev/rnaneon%40me.com >>> >>> This email sent to rnan...@me.com >>> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/samuel%40samkar.com >> >> This email sent to sam...@samkar.com >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com