I am trying to delete some records in the server-side using a DMI method.
I use this code:
Where "f_variante" is NOT a primary key.
I get this SQL:
So the whole table is being deleted.
If I include fieldsDeleteRequest.setAllowMultiUpdate(true); , then everything works fine:
But when I read the docs of setAllowMultiUpdate(true);:
provides safeguards for server code? If this is not set, the COMPLETE table is being deleted! Which should not be.
Using Smartgwt 4.1p power.
I use this code:
Code:
DSRequest fieldsDeleteRequest = new DSRequest( "table", DataSource.OP_REMOVE, rpcManager); fieldsDeleteRequest.setCriteria("f_variante", variantenId);
I get this SQL:
Code:
delete from table where '1' = '1'
If I include fieldsDeleteRequest.setAllowMultiUpdate(true); , then everything works fine:
Code:
DSRequest fieldsDeleteRequest = new DSRequest( "table", DataSource.OP_REMOVE, rpcManager); fieldsDeleteRequest.setAllowMultiUpdate(true); fieldsDeleteRequest.setCriteria("f_variante", variantenId);
Code:
provides safeguards for server code
Using Smartgwt 4.1p power.
Comment