-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QO 2022-07-25, QO 2022-08-08, QO 2022-08-22, QO 2022-09-05, QO 2022-09-19, QO 2022-10-03, QE 2022-10-17
This bug is relevant only for CQF/bonsai. Since the ABT translation layer relies on FieldPath (e.g. here), the restrictions on field names are different than the existing find/agg systems.
As an example, the following query should work:
assert.commandWorked(coll.insert({a: {$b: 1}})); assert.eq(1, coll.find({"a.$b": 1}).itcount());
But instead throws with ""FieldPath field names may not start with '$'. Consider using $getField or $setField."
At least two relevant JS tests are field_name_empty.js and field_name_validation.js.