craiggwilson/fluent-mongo — Issue #39: Wierd "enum nullable query" exception
Author: Goffen
Created: 2011-11-25 10:59:52+00:00
State: open

Hi there. Thx alot for doing this project, i like it a lot.

I just found a bug though, i first thought it was major but i've tried some alternatives and its not that big of a deal. Anyhow:

If you have a _nullable_ enum and use a query like this:

people = Collection.AsQueryable().Where(x => x.EnumProp == EnumOps.Op2).ToArray();

everything is fine. But when i do like this it crashes:

people = Collection.AsQueryable().Where(x => x.EnumProp != null && x.EnumProp == EnumOps.Op2).ToArray();