diff options
Diffstat (limited to 'odb/sqlite/simple-object-statements.txx')
-rw-r--r-- | odb/sqlite/simple-object-statements.txx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/odb/sqlite/simple-object-statements.txx b/odb/sqlite/simple-object-statements.txx index 8c61d5d..f3e617a 100644 --- a/odb/sqlite/simple-object-statements.txx +++ b/odb/sqlite/simple-object-statements.txx @@ -82,7 +82,7 @@ namespace odb while (!dls.empty ()) { delayed_load l (dls.back ()); - typename pointer_cache_traits::insert_guard g (l.pos); + typename pointer_cache_traits::insert_guard ig (l.pos); dls.pop_back (); if (l.loader == 0) @@ -118,7 +118,8 @@ namespace odb else l.loader (db, l.id, *l.obj); - g.release (); + pointer_cache_traits::initialize (ig.position ()); + ig.release (); } } @@ -126,11 +127,7 @@ namespace odb void object_statements<T>:: clear_delayed_ () { - // Remove the objects from the session cache. This is not the most - // efficient way to do this (cache_traits::erase() will check for - // a session on every iteration), but the delay vector won't be - // empty only if something goes wrong (i.e., we are throwing an - // exception). + // Remove the objects from the session cache. // for (typename delayed_loads::iterator i (delayed_.begin ()), e (delayed_.end ()); i != e; ++i) |