[CSHARP-954] Nullable Datetime Query Created: 19/Apr/14  Updated: 13/Apr/16  Resolved: 22/Apr/15

Status: Closed
Project: C# Driver
Component/s: Linq
Affects Version/s: 1.9
Fix Version/s: 2.1

Type: Bug Priority: Minor - P4
Reporter: Pedro Muller Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Development


Epic Link: Rewrite Linq

 Description   

I'm trying to query a over mongoDB using a nullable datetime and I get the following error:

Unable to determine the serialization information for the expression: MyNullableProperty.HasValue.

for more information take a look to this issue in stackOverflow:

http://stackoverflow.com/questions/23167181/mongodb-c-sharp-nullable-datetime-query



 Comments   
Comment by Githook User [ 22/Apr/15 ]

Author:

{u'username': u'craiggwilson', u'name': u'Craig Wilson', u'email': u'craiggwilson@gmail.com'}

Message: CSHARP-954: added NullableTransformer to make nullable property accesses of .HasValue and .Value look like reference types.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/a0f5025d31d0220a844a8755dde3c595d79ed22c

Comment by ron [ 04/Jan/15 ]

anyone knows when this is going to be fixed??

the following scenarios are also failing for LINQ (Unable to determine the serialization information for the expression)

var year = 2014;
this.repository.Find(_ => _.CreatedDateTime.Year == year).Count();

Generated at Wed Feb 07 21:38:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.