Hi,
Performing a first DynamicForm.fetchData(Criteria), then a second with exactly the same Criteria. The second one does not trigger any SQL statement in the log, hence does not update any data, because it is apparently assuming it does not need to fetchData since the Criteria has not changed, which is wrong since data in the DB may have changed between the two fetch.
My form is set to FetchMode.BASIC and I am using SGWT.mobile 2013-01-18 (cannot test with 2013-01-20 since my application does not even start since 2013-01-19 on, see other post).
My workaround at this time is to add a dummy criterion (always true) with a randomly chosen value to make sure criteria is different each time and that fetch is actually performed, but this is not very clean ...
Thanks for your help, Ben.
Performing a first DynamicForm.fetchData(Criteria), then a second with exactly the same Criteria. The second one does not trigger any SQL statement in the log, hence does not update any data, because it is apparently assuming it does not need to fetchData since the Criteria has not changed, which is wrong since data in the DB may have changed between the two fetch.
My form is set to FetchMode.BASIC and I am using SGWT.mobile 2013-01-18 (cannot test with 2013-01-20 since my application does not even start since 2013-01-19 on, see other post).
My workaround at this time is to add a dummy criterion (always true) with a randomly chosen value to make sure criteria is different each time and that fetch is actually performed, but this is not very clean ...
Code:
ac.addCriteria("id",OperatorId.GREATER_THAN,Math.random());
Comment