From cc569c1834e191eda45a328cfe34d15181d2d396 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 15 Oct 2011 11:33:40 +0200 Subject: Add support for readonly members New pragma: readonly. New test: readonly. --- odb/database.txx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/odb/database.txx b/odb/database.txx index 82afd64..c70697d 100644 --- a/odb/database.txx +++ b/odb/database.txx @@ -138,7 +138,12 @@ namespace odb throw not_in_transaction (); object_traits::callback (*this, obj,callback_event::pre_update); + + // Compiler error pointing here? Perhaps the object is readonly and + // therefore does not provide the update() function? + // object_traits::update (*this, obj); + object_traits::callback (*this, obj, callback_event::post_update); } @@ -160,7 +165,12 @@ namespace odb T& obj (pointer_traits::get_ref (pobj)); object_traits::callback (*this, obj, callback_event::pre_update); + + // Compiler error pointing here? Perhaps the object is readonly and + // therefore does not provide the update() function? + // object_traits::update (*this, obj); + object_traits::callback (*this, obj, callback_event::post_update); } -- cgit v1.1