Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top