Error on OData
-
We just switched from using fs storage provider to using PostgreSQL. We reimported all of our data and now we are getting this error when sending an odata query
Query:
/odata/folders?$filter=name%20ne%20%27tags%27%20and%20name%20ne%20%27shared%27Error:
{"error":{"code":500,"message":"Cannot read properties of undefined (reading 'toNode')","stack":"TypeError: Cannot read properties of undefined (reading 'toNode')\n at normalizeNode (/app-rprt/node_modules/jsreport-sql-2/lib/node/where.js:27:18)\n at constructor.add (/app-rprt/node_modules/jsreport-sql-2/lib/node/where.js:51:12)\n at constructor.where (/app-rprt/node_modules/jsreport-sql-2/lib/node/query.js:157:22)\n at module.exports (/app-rprt/node_modules/@jsreport/odata-to-sql/lib/filter.js:102:16)\n at module.exports (/app-rprt/node_modules/@jsreport/odata-to-sql/lib/query.js:66:11)\n at Object.query (/app-rprt/node_modules/@jsreport/odata-to-sql/lib/transformer.js:46:14)\n at Cursor.toArray (/app-rprt/node_modules/@jsreport/sql-store/lib/sqlProvider.js:22:29)\n at replay (/app-rprt/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:53:21)\n at /app-rprt/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:60:18\n at runMicrotasks (<anonymous>)","target":"/folders?$filter=name%20ne%20%27tags%27%20and%20name%20ne%20%27shared%27","details":[]},"innererror":{}}
Before we rollback, could this be an issue with the provider or do you think it's an issue with our data somehow?
-
in looking at https://github.com/jsreport/jsreport/blob/master/packages/odata-to-sql/lib/filter.js
it seems that "ne" notEqual isn't in the list of supported operations.
-
The
ne
isn't supported. I will add it to the next release.
The fs provider doesn't fail but doesn't supportne
and doesn't filter as well.