From 424b08e7e843498923b3c55e576c11cdf4f2e158 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Jan 2013 14:50:26 +0200 Subject: 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). --- odb/pgsql/polymorphic-object-result.txx | 1 + 1 file changed, 1 insertion(+) (limited to 'odb/pgsql/polymorphic-object-result.txx') diff --git a/odb/pgsql/polymorphic-object-result.txx b/odb/pgsql/polymorphic-object-result.txx index daea20e..e968b82 100644 --- a/odb/pgsql/polymorphic-object-result.txx +++ b/odb/pgsql/polymorphic-object-result.txx @@ -153,6 +153,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 (); } -- cgit v1.1