From 27c4eddafa46061b50bd3f46effea4975a344ac6 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov
const
, for
+ example:
+
+ +#pragma db object optimistic +class person +{ + ... + + #pragma db version + const unsigned long version_; +}; +
When we call the database::update()
function
(Section 3.9, "Updating Persistent Objects") and pass
@@ -7542,6 +7556,7 @@ person p;
t.commit ();
}
+cerr << "enter age for " << p.first () << " " << p.last () << endl;
unsigned short age;
cin >> age;
p.age (age);
@@ -7574,7 +7589,8 @@ p.age (age);
more expensive than a successful one. As a result, optimistic
concurrency works best for situations with low to medium contention
levels where the majority of the application transactions complete
- without update conflicts.
In addition to updates, ODB also performs state mismatch detection when we are deleting an object from the database -- cgit v1.1