문제

I have the following statement (using RavenDb):

session.Query<Container>().Where(c=>c.ParentId == null).Count();

When I run the above, the count is always 0, but if I do this instead:

session.Query<Container>().ToList().Where(c=>c.ParentId == null).Count();

It returns the correct number.

Anyone have the clue on how to achieve this? Is RavenDb got a different handling of null value in it's query?

-- UPDATE --

I tested the above statements in localhost:8080 rather than before (which is in IIS deployment, on remote host) and it works. Maybe it is my IIS configuration problem?

도움이 되었습니까?

해결책

You're right RavenDB handles null differently (because it uses Lucene under the hood).

I'd recommend posting this on the mailing list, so that it can be fixed. See http://groups.google.com/group/ravendb.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top