From 150064d45cb6b0e25464f19e5a08324f42d94627 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Jan 2013 16:31:29 +0200 Subject: Make session cache management functions static, add notifications --- odb/relational/source.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'odb') diff --git a/odb/relational/source.cxx b/odb/relational/source.cxx index 4fceb30..661db71 100644 --- a/odb/relational/source.cxx +++ b/odb/relational/source.cxx @@ -1463,9 +1463,14 @@ traverse_object (type& c) if (!abst) // If we are poly-abstract, then top will always be false. { if (poly) - os << "if (top)" << endl; + os << "if (top)" + << "{"; - os << "callback (db, obj, callback_event::post_update);"; + os << "callback (db, obj, callback_event::post_update);" + << "pointer_cache_traits::update (db, obj);"; + + if (poly) + os << "}"; } } // readonly @@ -2006,7 +2011,7 @@ traverse_object (type& c) else os << "callback (db, obj, callback_event::post_load);"; - os << "pointer_cache_traits::initialize (ig.position ());" + os << "pointer_cache_traits::load (ig.position ());" << "}" << "else" << endl << rsts << ".delay_load (id, obj, ig.position ()" << @@ -2106,7 +2111,7 @@ traverse_object (type& c) << rsts << ".load_delayed ();" << "l.unlock ();" << "callback (db, obj, callback_event::post_load);" - << "reference_cache_traits::initialize (pos);" + << "reference_cache_traits::load (pos);" << "ig.release ();" << "return true;"; } -- cgit v1.1