Unless I'm behind on my knowledge, I don't believe that iBatis.Net has
automatic optimistic concurrency implementation. You will have to
implement this yourself.
This is the pseudo of how I implemented mine:
BusinessBase<T> : IClonable
-Clone()
-OriginalObject AS T
Employee : BusinessBase<Employee>
-SSN
-FirstName
-LastName
1. Retrieve Employee
2. Clone Employee and store in OriginalObject
3. Employee is parameter class of Update Ibatis Mapping
UPDATE dbo.Employee
SET FirstName = #_firstName#
, LastName = #_lastName#
, SSN = #_ssn#
WHERE FirstName = #OriginalObject._firstName#
AND LastName = #OriginalObject._lastName#
AND SSN = #OriginalObject._ssn#
Unless you have build some kind of framework to do this, it is a lot of
manual, repetitive work. Only do it when you really need to.
Regards,
Tom Nguyen
Sr. Developer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
________________________________
From: Philippe Peuret [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 18, 2007 7:20 AM
To: [email protected]
Subject: TR: iBatis.Net - Optimistic concurrency control
Hello,
How to use the optimistic concurrency control when we update the
database with iBatis.Net ?
Because, when we use the <insert> or <update> elements, we can only pass
one parameter : the object to insert or to update. But there is no other
parameter to pass the data to the optimistic concurrency control.
Thank you for your help.
************************************************************************************
This e-mail message and any files transmitted herewith, are intended solely for
the
use of the individual(s) addressed and may contain confidential, proprietary or
privileged information. If you are not the addressee indicated in this message
(or responsible for delivery of this message to such person) you may not
review,
use, disclose or distribute this message or any files transmitted herewith. If
you
receive this message in error, please contact the sender by reply e-mail and
delete
this message and all copies of it from your system.
************************************************************************************