title: VB net & Mongo: Using where clause with LINQ causes error "Unsupported where clause: (Boolean)Operators.CompareObjectLess"
body: <p>I have a collection in MongoDB and I'm using MongoDB Driver in VB net. I want to update several documents depending on a condition.
  For this, I want to use LINQ, but the select causes an error and I don't know how to fix it.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>Dim update_for As UpdateBuilder
  Dim query_for As IMongoQuery
  Dim coll_for = db.GetCollection(Of MyClass)("collection_1")
  Dim queryMun = (From a In coll_for _
                  Where (a.field_1 &lt; 10000) _
                  Select a)
  
  For Each emp In queryMun
      query_for = Query.EQ("_id", emp.Id)
      update_for = Update.Set("field_1", BsonValue.Create("0" + emp.field_1))
      coll.Update(query_for, update_for, opts)
  Next
  </code></pre>
  
  <p>When it executes de For Each sentence, it raises the exception: <strong><em>Unsupported where clause: (Boolean)Operators.CompareObjectLess(a.field_1, 10000, true).</em></strong></p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thank you very much for your help.</p>