RavenDB dynamic predicate predicate not working correctly

Consider 2 queries:

var test1 = store.OpenSession().Query<TestClass>().Where(x => x.Id == 1).ToList(); var test2 = store.OpenSession().Query<TestClass>().Where(x => x.Id >= 1).ToList(); 

test1 returns 1 element in the list. test2 returns 0 elements.

For some reason, I can't get it to return any elements in the second query. Is there a reason for this?

+4
source share
1 answer

Well, since I commented, I created a failed test for this and posted it to ayende for comment.

https://github.com/ravendb/ravendb/issues/337

The answer is that it is not currently supported, but ayende made some changes to support it.

https://github.com/ayende/ravendb/commit/f6beb4f9d8c763c3eb37f93fed84c657e0f207fb

Although I am reading this commit, I am not sure that he is happy with it :)

So, if you need it now, you will need to go to the source code, otherwise it will turn into a future stable build.

+3
source

All Articles