aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-01-16 16:31:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-01-16 16:31:29 +0200
commit150064d45cb6b0e25464f19e5a08324f42d94627 (patch)
tree4febe577b8f32c4b662879e9512b742b68d43b2d /odb
parentf43bfd544372691933e7b5a0bd44ea66eb79266c (diff)
Make session cache management functions static, add notifications
Diffstat (limited to 'odb')
-rw-r--r--odb/relational/source.cxx13
1 files changed, 9 insertions, 4 deletions
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;";
}