How to create a server-side InSet operator? I am doing the following:
But I am getting:
RPCManager:com.isomorphic.criteria.criterion.SimpleCriterion cannot be cast to com.isomorphic.criteria.criterion.SetCriterion
What am I doing wrong?
Using smartgwt 6.1p power 6.1-p20180208
Code:
DSRequest updateReq = new DSRequest("myDS"DataSource.OP_UPDATE, rpcManager); List<Criterion> criterions = new ArrayList<>(); Criterion c = new SimpleCriterion("f_einrichtung", DefaultOperators.InSet, einrichtungen); criterions.add(c); updateReq.setAllowMultiUpdate(true); Map<String, Object> clearedValues = new HashMap<>(); clearedValues.put("f_value_to_clear", null); updateReq.setValues(clearedValues); AdvancedCriteria ac = new AdvancedCriteria(DefaultOperators.Or, criterions.toArray(new Criterion[] {})); updateReq.setAdvancedCriteria(ac); updateReq.execute();
RPCManager:com.isomorphic.criteria.criterion.SimpleCriterion cannot be cast to com.isomorphic.criteria.criterion.SetCriterion
Code:
17:21:14.500 [ERROR] [builtinds] 17:21:14.499:XRP2:WARN:RPCManager:com.isomorphic.criteria.criterion.SimpleCriterion cannot be cast to com.isomorphic.criteria.criterion.SetCriterion - response: {operationId: "custom", clientContext: undef, internalClientContext: undef, context: Obj, transactionNum: 0, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{affectedRows:..."[250], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, affectedRows: 0, data: "com.isomorphic.criteria.criterion.Simple..."[114], invalidateCache: false, isDSResponse: true, queueStatus: -1} com.smartgwt.client.core.JsObject$SGWT_WARN: 17:21:14.499:XRP2:WARN:RPCManager:com.isomorphic.criteria.criterion.SimpleCriterion cannot be cast to com.isomorphic.criteria.criterion.SetCriterion - response: {operationId: "custom", clientContext: undef, internalClientContext: undef, context: Obj, transactionNum: 0, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{affectedRows:..."[250], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, affectedRows: 0, data: "com.isomorphic.criteria.criterion.Simple..."[114], invalidateCache: false, isDSResponse: true, queueStatus: -1} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368) at java.lang.Thread.run(Thread.java:745)
Using smartgwt 6.1p power 6.1-p20180208
Comment