From 1ac1ae65e6cbf42c002acb27615127bbc0b20d9e Mon Sep 17 00:00:00 2001
From: Boris Kolpackov
Finally, the session caches both constant and non-constant objects, +
Finally, the session caches both constant and unrestricted objects,
depending on whether a constant reference or constant pointer was
passed to the database::persist()
function (in contrast,
- when loaded, objects are always created and cached as non-constant).
- If we try to load an object as non-constant that was previously
+ when loaded, objects are always created and cached as unrestricted).
+ If we try to load an object as unrestricted that was previously
persisted and cached as constant, the odb::const_object
exception is thrown. The following transaction shows the
situation where this would happen: