Hi Isomorphic,
If would appear that if we have a defaultValue defined in the DS for an integer field, when creating filters, the between (inclusive) generates a String "0" start value instead of a numeric 0 start value. We don't have the problem for equals.
SmartClient Version: v10.1p_2017-01-17/Pro Deployment (built 2017-01-17)
This causes a ClassCastException.
DSRequest [equals]: OK
DSRequest [between (inclusive)]: NOT OK
Thanks
If would appear that if we have a defaultValue defined in the DS for an integer field, when creating filters, the between (inclusive) generates a String "0" start value instead of a numeric 0 start value. We don't have the problem for equals.
SmartClient Version: v10.1p_2017-01-17/Pro Deployment (built 2017-01-17)
Code:
<field name="retryMaximum" type="integer" defaultValue="0"</field>
Code:
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
at com.isomorphic.criteria.RangeOperator.parseCriterion(RangeOperator.java:81)
at com.isomorphic.criteria.Evaluator.parseCriterion(Evaluator.java:226)
at com.isomorphic.criteria.OperatorBase.parseCriterion(OperatorBase.java:66)
at com.isomorphic.criteria.Evaluator.parseCriterion(Evaluator.java:226)
at com.isomorphic.criteria.Evaluator.parseAdvancedCriteria(Evaluator.java:201)
at com.isomorphic.datasource.DataSource.parseAdvancedCriteria(DataSource.java:7294)
at com.isomorphic.criteria.AdvancedCriteria.fromCollections(AdvancedCriteria.java:519)
Code:
...
data:{
operator:"and",
criteria:[
{
fieldName:"retryMaximum",
operator:"equals",
value:0
}
]
},
...
Code:
...
data:{
operator:"and",
criteria:[
{
operator:"iBetweenInclusive",
fieldName:"retryMaximum",
start:"0",
end:10
}
]
}
...
Comment