vadimtsushko / objectory

Unsupported: Objectory - object document mapper for server-side and client side Dart applications
MIT License
55 stars 12 forks source link

Filtering by DateTime does not work #23

Closed kaisellgren closed 11 years ago

kaisellgren commented 11 years ago

When I try to filter by a date it does not simply have any effect:

objectory.find($Event.eq('startDate', new DateTime.now()));

It will find all events, regardless of their start date.

In the model it looks like:

DateTime get startDate => getProperty('startDate');
set startDate(DateTime value) => setProperty('startDate', value);

This is browser-side Objectory.

kaisellgren commented 11 years ago

Ok I noticed that if I switch the order of query parameters, I can get this to work:

Works:

query.gt('startDate', new DateTime.now()).sortBy('startDate', false);

Does not work:

query.sortBy('startDate', false).gt('startDate', new DateTime.now());
kaisellgren commented 11 years ago

So it seems this is duplicate of #22