Odata filter results in exception (operator does not exist: bigint = boolean)

1
Goal is to retrieve EntityA with a filter on the association EntityA_EntityB != empty according to https://world.mendix.com/display/refguide5/OData+Query+Options The Odata call is http://localhost:8080/odata/DataService/EntityA?$filter=EntityA_EntityB ne null Other filters like $filter=Naam%20eq%20%27Pim van der Noll%27 working fine. The association is exposed in de Published Odata Service. I got a exception on this one: "Exception occurred while processing REST request " with the following stacktrace. any idea's how to solve this? com.mendix.connectionbus.ConnectionBusRuntimeException: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: An exception has occurred for the following request(s): XPathTextGetRequest (depth = -1, amount = 1000): //Mod.EntityA[Mod.EntityA_EntityB] at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:348) Caused by: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: An exception has occurred for the following request(s): XPathTextGetRequest (depth = -1, amount = 1000): //Mod.EntityA[Mod.EntityA_EntityB] at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:51) Caused by: com.mendix.systemwideinterfaces.connectionbus.ConnectionBusException: Exception occurred while retrieving data. (SQL State: 42883, Error Code: 0) at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.getCorrectException(JDBCDataStore.java:1453) Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: bigint = boolean Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 897 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:286) at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207) at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207) at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:207) at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.execRetrieveQuery(JDBCDataStore.java:349) at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.execRetrieveQueries(JDBCDataStore.java:221) at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.retrieve(JDBCDataStore.java:178) at com.mendix.connectionbus.connections.jdbc.JDBCDataStore.retrieve(JDBCDataStore.java:165) at com.mendix.connectionbus.retrieve.DataStoreCaller.executeQueries(DataStoreCaller.java:173) at com.mendix.connectionbus.retrieve.DataStoreCaller.executeQueries(DataStoreCaller.java:137) at com.mendix.connectionbus.retrieve.DataStoreCaller.getResult(DataStoreCaller.java:61) at com.mendix.connectionbus.retrieve.GetRequestHandler.doRequest(GetRequestHandler.java:73) at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:45) at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:368) at com.mendix.connectionbus.ConnectionBusImpl.doRequest(ConnectionBusImpl.java:346) at com.mendix.connectionbus.retrieve.QueryBuilderHandler$.executeQuery(QueryBuilderHandler.scala:54) at com.mendix.connectionbus.retrieve.QueryBuilderHandler.executeQuery(QueryBuilderHandler.scala) at com.mendix.connectionbus.ConnectionBusImpl.execute(ConnectionBusImpl.java:502) at com.mendix.datastorage.impl.QueryBuilder$InnerIterator.x$1$lzycompute(QueryBuilder.scala:84) at com.mendix.datastorage.impl.QueryBuilder$InnerIterator.x$1(QueryBuilder.scala:82) at com.mendix.datastorage.impl.QueryBuilder$InnerIterator.rowIterator$lzycompute(QueryBuilder.scala:82) at com.mendix.datastorage.impl.QueryBuilder$InnerIterator.rowIterator(QueryBuilder.scala:82) at com.mendix.datastorage.impl.QueryBuilder$InnerIterator.hasNext(QueryBuilder.scala:88) at com.mendix.datastorage.impl.QueryBuilder$$anon$1.hasNext(QueryBuilder.scala:72) at com.mendix.integration.rest.odata.ODataModule.handleDataQuery(ODataModule.scala:142) at com.mendix.integration.rest.odata.ODataModule.handle(ODataModule.scala:68) at com.mendix.integration.rest.RestModule.handleRestCall(RestModule.scala:28) at com.mendix.integration.requesthandlers.RestRequestHandler.processRequest(RestRequestHandler.scala:14) at com.mendix.externalinterface.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:69) at com.mendix.externalinterface.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:66) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.externalinterface.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:72) at com.mendix.core.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:720) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:41) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745)
asked
2 answers
0

Shouldn't it be:

?$filter=Association_EntityA_EntityB ne null

Or is the Association_ part purely added to the howto for documentation purposes?

answered
0

I Tested with 5.18 and 5.20, the following query does work returning all Entity2 which has association. http://localhost:8080/odata/PublishedODataservice/Entity2?$filter=Entity2_Entity%20ne%20null

The difference is that I use the default database instead of postgresql. Could that be the problem?

answered