Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How set a numeric array as criteria with Rest API

    I am trying to set an anrray as criteria within XML for a REST API call.

    Code:
    <request>
    	<data>
    		<_constructor>AdvancedCriteria</_constructor>
    		<operator>and</operator>
    		<criteria>
    			<criterion>
    				<fieldName>id</fieldName>
    				<operator>inSet</operator>
    				<value>[12, 11]</value>
    			</criterion>
    		</criteria>
    	</data>
    	<dataSource>ds</dataSource>
    	<operationType>fetch</operationType>
    </request>
    Logs tell me "String '[12,11]' was passed as filter criteria for a numeric field. We could not parse it."

    Code:
    === 2013-08-09 13:19:09,197 [80-8] INFO  SQLDataSource - [builtinApplication.ds] Performing fetch operation with
    criteria: {criteria:[{fieldName:"id",operator:"inSet",value:"[12,11]"}],operator:"and",_constructor:"AdvancedCriteria"}	 values: {criteria:[{fieldName:"id",operator:"inSet",value:"[12,11]"}],operator:"and",_constructor:"AdvancedCriteria"}
    === 2013-08-09 13:19:09,198 [80-8] WARN  SQLWhereClause - [builtinApplication.ds] String '[12,11]' was passed as filter criteria for a numeric field. We could not parse it.
    http://www.smartclient.com/smartgwt/...ataSource.html does not help me.
    Is there a way to pass the array? Within SmartGWT passing an int array works fine...
    Last edited by escrea; 9 Aug 2013, 03:33.
Working...
X