Hello,
This is a question and a suggestion concerning
optimistic lock using Torque:
Principle (a standard way of dealing with optimistic
lock):
1. Use a column holding a timestamp (or integer
stamp).
2. Do the update using the already loaded timestamp
as a selectCriterion and a new timestamp among the
updateCriteria.
3. If 1 row modified then OK.
4. If 0 rows modified then inform the user about this
concurrent access.
Problem:
BasePeer.insertOrUpdateRecord(...) does not throw an
exception if no rows are modified.
Question:
Is there some other technique already used for
dealing with optimistic lock using Torque ?
Suggestion:
Would the following be a plausible solution ?
Test the result of "rec.save();" inside
"BasePeer.insertOrUpdateRecord(...)" and throw
something like a "NoRowsModifiedException" ...
Thanks a lot.
Theodore Thlivitis
=====
_______________________________________________________
Permanent email address: [EMAIL PROTECTED]
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>