@bedrockio/model 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -263,7 +263,11 @@ function isRangeQuery(schema, key, value) {
263
263
  function mapOperatorQuery(obj) {
264
264
  const query = {};
265
265
  for (let [key, val] of Object.entries(obj)) {
266
- query[`$${key}`] = val;
266
+ if (isMongoOperator(key)) {
267
+ query[key] = val;
268
+ } else {
269
+ query[`$${key}`] = val;
270
+ }
267
271
  }
268
272
  return query;
269
273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/model",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Bedrock utilities for model creation.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/search.js CHANGED
@@ -276,7 +276,11 @@ function isRangeQuery(schema, key, value) {
276
276
  function mapOperatorQuery(obj) {
277
277
  const query = {};
278
278
  for (let [key, val] of Object.entries(obj)) {
279
- query[`$${key}`] = val;
279
+ if (isMongoOperator(key)) {
280
+ query[key] = val;
281
+ } else {
282
+ query[`$${key}`] = val;
283
+ }
280
284
  }
281
285
  return query;
282
286
  }