Hi all,
I am using Torque in my Web Entry Tool project. In the multi user environment when
the update code similar to the following
addressOrgObj.setRporgname("abc");
addressOrgObj.setCity("abc");
addressOrgObj.setCountry(3);
addressOrgObj.setEmailGeneral([EMAIL PROTECTED]);
AddressOrgPeer.doUpdate(addressOrgObj);
was executed by one user. It will perform successfully regardless whether the original
record in the database has been deleted or changed by another user (What I mean is no
"Exception" were thrown). Since "doUpdate" method of the Peer class return void, there
is no way of checking whether 0 or 1 record had been affected by the "doUpdate"
operation. In Microsoft ADO.NET and Oracle BC4J (similar to Torque) environment if one
try to update (submit) changed cached record back to the database and the
corresponding record in the database has been updated or deleted by another user, some
sort of data concurrency exception were thrown so one can check the existent of that
record and handle the conflict accordingly and then inform the user of the update
conflict. I would like to know how could I do this similar conflict handling in
Torque. If possible could anyone give a sample code for it or point to one. I wouldn't
want to modify the source code for the "doUpdate" method or anything of that sort.
Just want an elegance way around in such situation. Thanks in advance for any good
suggestion.
Regards,