Hi Samuel, Am 20.09.2013 um 16:42 schrieb Samuel Pelletier:
> Hi Fabian, > > The problem with too many qualifier is the fact you traverse a too many. > There is no way to answer to the question "watch do you want?", do you want > the Course where there is at least one event after now of course where all > events are after now? I'd expect the qualifier to match courses that have at least one event with an end date after "now", which is what the same qualifier will do in SQL. On most occasions when qualifying in memory, I guess one would approach this in a different way. Here I wanted to unit test a qualifier that otherwise only gets used when fetching from the DB. Tant pis… Fabian > You need to be more precise. > > Try add a atMin() or atMax() like > Course.EVENTS.atMax(CourseEvent.END_DATE_TIME).after(new NSTimestamp()) to > get Course where the last event is after now (not ended). > > Samuel > > > > Le 2013-09-19 à 12:36, Fabian Peters <[email protected]> a écrit : > >> Hi all, >> >> I just tried to write a unit test for a basic qualifying fetch spec. What I >> found is that the in-memory evaluation fails for key-paths with a to-many, >> e.g. this: >> >> EOQualifier q = Course.EVENTS.dot(CourseEvent.END_DATE_TIME.after(new >> NSTimestamp())); >> >> Debugging the qualifier evaluation, I see that the timestamp gets directly >> compared to an array of timestamps and thus the qualifier never matches. >> >> Having looked through some old code, I seem to never have used an in-memory >> evaluation on a to-many key-path. But somehow I assumed it should be >> possible. Wishful thinking? >> >> Fabian >> _______________________________________________ >> 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/samuel%40samkar.com >> >> This email sent to [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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
