Hi Isomorphic,
please see this 12.0p based testcase (v12.0p_2018-12-14).
Preface: I'm not 100% sure the SmartClient line
is correct, but it happens the same in my SmartGWT application using
Testcase:
Now, do these steps:
I also did the same in my application (see the setImplicitCriteria() call above) and compared good and bad requests.
Here there is one detail, which makes it VERY hard to analyse it serverside where one request hard the expected WHERE clause and the the other just WHERE '1' = '1'.
(This does not happen 1:1 the same in the testcase)
"DSRequest"-Tab compared (good left, bad right; important parts the same):
"RPCRequest"-Tab of the same requests compared (good left, bad right; see the missing "_constructor"-line):
I'm not sure whether the error in the Developer Console in the DSRequest-Tab or RPCRequest-Tab, but I assume the former.
The main issue is the modification of the implicitCriteria by just a fetch.
This is an important one for me.
Best regards
Blama
please see this 12.0p based testcase (v12.0p_2018-12-14).
Preface: I'm not 100% sure the SmartClient line
Code:
implicitCriteria: { _constructor:"AdvancedCriteria", fieldName: "units", operator: "isNull" },
Code:
setImplicitCriteria(new AdvancedCriteria("STATUS_WONLOST_ID", OperatorId.IS_NULL));
Code:
isc.ListGrid.create({ ID:"dsListGrid", width: "100%", height: "100%", autoFetchData: false, canEdit: true, initialSort: [ {property: "category", direction: "ascending"}, {property: "units", direction: "ascending"} ], dataSource: "supplyItem", showFilterEditor: true, implicitCriteria: { _constructor:"AdvancedCriteria", fieldName: "units", operator: "isNull" }, }); isc.IButton.create({ ID:"fetchButton", width: 200, title:"Fetch no criteria", click : function () { dsListGrid.fetchData(); } }); isc.IButton.create({ ID:"fetchFilteredButton", width: 200, title:"units criteria fetchData()", click : function () { dsListGrid.fetchData({ _constructor: "AdvancedCriteria", fieldName: "units", operator: "equals", value: "Ea"}); } }); isc.IButton.create({ ID:"showImplicitCriteria", width: 200, title:"Show ImplicitCriteria", click : function () { isc.say(dsListGrid.getImplicitCriteria()) } }); isc.HStack.create({ ID:"hStack", membersMargin:10, members:[ fetchButton, fetchFilteredButton, showImplicitCriteria] }); isc.VLayout.create({ membersMargin:10, width: "100%", height: "100%", members:[ dsListGrid, hStack] });
- Developer Console, Results, Evaluate JS Expression: "dsListGrid.getImplicitCriteria()"
Evaluator: result of 'dsListGrid.getImplicitCriteria()' (0ms):
{_constructor: "AdvancedCriteria",
fieldName: "units",
operator: "isNull"} - Click "Fetch no criteria", data fetched as expected, in DSRequest this is to see, as expected:
data:{
fieldName:"units",
operator:"isNull"
}, - Repeat step 1, same result (as expected)
- Click "units criteria fetchData()", data fetched as expected, in DSRequest this is to see, not expected:
data:{
operator:"and",
criteria:[
{
operator:"and",
criteria:[
{
fieldName:"fieldName",
operator:"iContains",
value:"units"
},
{
fieldName:"operator",
operator:"iContains",
value:"equals"
},
{
fieldName:"value",
operator:"iContains",
value:"Ea"
}
]
},
{
fieldName:"units",
operator:"isNull"
}
]
}, - Repeat step 1, different result (not expected)
Evaluator: result of 'dsListGrid.getImplicitCriteria()' (0ms):
{fieldName: "units",
operator: "isNull"}
I also did the same in my application (see the setImplicitCriteria() call above) and compared good and bad requests.
Here there is one detail, which makes it VERY hard to analyse it serverside where one request hard the expected WHERE clause and the the other just WHERE '1' = '1'.
(This does not happen 1:1 the same in the testcase)
"DSRequest"-Tab compared (good left, bad right; important parts the same):
"RPCRequest"-Tab of the same requests compared (good left, bad right; see the missing "_constructor"-line):
I'm not sure whether the error in the Developer Console in the DSRequest-Tab or RPCRequest-Tab, but I assume the former.
The main issue is the modification of the implicitCriteria by just a fetch.
This is an important one for me.
Best regards
Blama
Comment