[CSHARP-542] Nullable comparisons don't work in VB Created: 30/Jul/12  Updated: 16/Aug/12  Resolved: 30/Jul/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.6

Type: Bug Priority: Major - P3
Reporter: Craig Wilson Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

http://stackoverflow.com/questions/11705522/query-mongodb-using-c-sharp-nullable-types

Imports MongoDB.Bson
Imports MongoDB.Driver
Imports MongoDB.Driver.Linq
 
Module Module1
    Public Class Test
        Public Id As ObjectId
 
        Public MyNullableInt As Nullable(Of Integer)
    End Class
 
    Sub Main()
        Dim server = MongoServer.Create()
        Dim db = server.GetDatabase("test")
        Dim col = db.GetCollection(Of Test)("foos")
        col.Drop()
 
 
        Dim query = col.AsQueryable.Where(Function(p) p.MyNullableInt = 3)
 
 
        Dim list = query.ToList()
 
 
    End Sub
 
End Module



 Comments   
Comment by auto [ 16/Aug/12 ]

Author:

{u'date': u'2012-07-30T08:34:16-07:00', u'email': u'craiggwilson@gmail.com', u'name': u'Craig Wilson'}

Message: CSHARP-542: normalized a vb expression related to nullable comparisons.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/34b7e877bbec6c31fd8bd0c341fcd243fa543520

Comment by Craig Wilson [ 30/Jul/12 ]

Awaiting code review.

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