[CSHARP-1107] Query.LT, LTE and other similar methods require a name while it should be optional Created: 18/Nov/14  Updated: 01/Mar/16  Resolved: 01/Mar/16

Status: Closed
Project: C# Driver
Component/s: API
Affects Version/s: 1.9.2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Vladimir Perevalov Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CSHARP-1585 Support for Filters without name in C... Backlog

 Description   

Look at example for elemMatch: http://docs.mongodb.org/manual/reference/operator/query/elemMatch/#op._S_elemMatch

Try to create such a query:
{ results: { $elemMatch:

{ $gte: 80, $lt: 85 }

} }

It should look something like this:
Query.ElemMatch("results", Query.And(Query.GTE(80), Query.LT(85)))

But it is not possible, since GTE, GT, LTE, LT and all other similar methods require a name. It will either throw null reference, or, if you set any name, query will not return any results.



 Comments   
Comment by Craig Wilson [ 01/Mar/16 ]

We won't be fixing this as it relates to the legacy API. We are using a new ticket for the new API, CSHARP-1585.

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