Discussion:
[mongodb-user] MongoDb C# driver version 3.4.0 error
Сергей Барков
2016-12-06 16:10:01 UTC
Permalink
Hello ! On my mongo db c# application I have updated mongo c# driver
version from 3.3.0 to 3.4.0 and have received that reply from my web
service:

"Error": "Unsupported filter: (Convert({document}{Time}) < 05.12.2016 16 <callto:05.12.2016 16>:03:39).".


This is my code:

Expression<Func<Message, bool>> query = x => x.id == Id &&
x.Time < transportTime && x.Time > errorTime &&
x.Lat > 0 && x.Long > 0 &&
x.Liters > 0;

var item = collection.Find(query).SortByDescending(x => x.Time).Limit(1).FirstOrDefault();


I appreciate any feedback you may have.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/642f1271-f78b-4cbe-b41d-80f9fd0b1bd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Wan Bachtiar' via mongodb-user
2016-12-15 06:21:24 UTC
Permalink
On my mongo db c# application I have updated mongo c# driver version from
3.3.0 to 3.4.0 and have received that reply from my web service:

Hi,

Are you referring to the MongoDB server version 3.4.0
<https://docs.mongodb.com/manual/> ? As the current latest MongoDB C#/.Net
Driver is only at version 2.3.x
<http://mongodb.github.io/mongo-csharp-driver/2.3/>.

See also MongoDB C#/.Net driver compatibility chart
<https://docs.mongodb.com/ecosystem/drivers/csharp/#mongodb-compatibility>
to check whether your current MongoDB C# driver is compatible with your
MongoDB server version.

Try to simplify your query by removing some of the filter fields to find
the exact problem. For example, only use filter x.Time < transportTime and
see whether you’re still getting an error.

Could you provide the following information:

- MongoDB .Net driver version
- An example MongoDB document to find out the Time field type.
- The value of filter variables transportTime and errorTime

Regards,

Wan.
​
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/fa48901f-46e7-4a14-9599-c8bcad55a83f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Robert Stam' via mongodb-user
2016-12-15 13:38:29 UTC
Permalink
If x.Time is a DateTime and transportTime is a Nullable<DateTime> this
could be the same issue as this ticket:

https://jira.mongodb.org/browse/CSHARP-1867

On Thu, Dec 15, 2016 at 12:21 AM, 'Wan Bachtiar' via mongodb-user <
Post by 'Wan Bachtiar' via mongodb-user
On my mongo db c# application I have updated mongo c# driver version from
Hi,
Are you referring to the MongoDB server version 3.4.0
<https://docs.mongodb.com/manual/> ? As the current latest MongoDB
C#/.Net Driver is only at version 2.3.x
<http://mongodb.github.io/mongo-csharp-driver/2.3/>.
See also MongoDB C#/.Net driver compatibility chart
<https://docs.mongodb.com/ecosystem/drivers/csharp/#mongodb-compatibility>
to check whether your current MongoDB C# driver is compatible with your
MongoDB server version.
Try to simplify your query by removing some of the filter fields to find
the exact problem. For example, only use filter x.Time < transportTime
and see whether you’re still getting an error.
- MongoDB .Net driver version
- An example MongoDB document to find out the Time field type.
- The value of filter variables transportTime and errorTime
Regards,
Wan.
​
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/
msgid/mongodb-user/fa48901f-46e7-4a14-9599-c8bcad55a83f%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/fa48901f-46e7-4a14-9599-c8bcad55a83f%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAJCJWG01wsEjxU3JRcfz8RhCgaGLbKXKtUWU8zEnuipVRn%3DGTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...