aboutsummaryrefslogtreecommitdiff
path: root/odb/mssql/polymorphic-object-result.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-01-09 14:50:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-01-16 07:42:55 +0200
commitb76acd5a985be43ed58e023bd4fb51d92471d665 (patch)
tree2b98af5654adb82694d6aee5746768d6d17e7275 /odb/mssql/polymorphic-object-result.txx
parente630f23f70bcef5bbe5b9372ac4c84b918a2154b (diff)
Implement two-phase session insertion
On the first step an uninitialized object is inserted into the cache as before (this is necessary to handle recursive loading). The second step is to notify the session that the object has been initialized. On this second step the session can perform change tracking preparations, such as make a copy of the object or reset the modification flag. New test: common/session/custom (implements a custom session that uses copies to track changes).
Diffstat (limited to 'odb/mssql/polymorphic-object-result.txx')
-rw-r--r--odb/mssql/polymorphic-object-result.txx1
1 files changed, 1 insertions, 0 deletions
diff --git a/odb/mssql/polymorphic-object-result.txx b/odb/mssql/polymorphic-object-result.txx
index 53244a3..ebc51f3 100644
--- a/odb/mssql/polymorphic-object-result.txx
+++ b/odb/mssql/polymorphic-object-result.txx
@@ -173,6 +173,7 @@ namespace odb
ce = callback_event::post_load;
pi.dispatch (info_type::call_callback, this->db_, pobj, &ce);
+ object_traits::pointer_cache_traits::initialize (ig.position ());
ig.release ();
}