Originally posted by long lingyu: In my project, when user book a contractor, should I find the record according to all the fields or the recNo in database for updating ? I can use the findByCriteria function.
It depends on other design factors. For example if you are using locking from client side, there is no need to find the record with all the fields. You can just send the record number and book the record. On the other hand, if you are not using client side locking, then it is better to send the record along with the record number, find the record, see if the record has'nt modified meanwhile and if not book it. If modified, you can throw an exception if you want...again it depends on your design. Hope it helps.
I agree with Satish. I used server side locking and passed my whole record, including record number, to client side. I then also passed record back to server when booking so that a check could be made whether it has been modified by somebody else. J