You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled rejection Error: Can't use $geoIntersects
at SchemaType.castForQuery (/xxx/node_modules/mongoose/lib/schematype.js:875:13)
at cast (/xxx/node_modules/mongoose/lib/cast.js:169:39)
at Query.cast (/xxx/node_modules/mongoose/lib/query.js:2575:10)
I solved this, implementing:
GeoJSON.prototype.castForQuery = function ($cond, val) {
if (arguments.length === 2) {
return val;
}
return $cond;
}
If you think, it's good enough, you can put it to the code, and do the same for other classes.
There is a workaround, without changing the module:
I have:
When I'm trying to do something like that:
I'm getting:
I solved this, implementing:
If you think, it's good enough, you can put it to the code, and do the same for other classes.
There is a workaround, without changing the module:
But you'll need to do this for every additional condition you want to support, and you need to understand possible impact of this way.
The text was updated successfully, but these errors were encountered: