summaryrefslogtreecommitdiff
path: root/odb/relational/source.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-10-14 15:08:22 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-10-21 11:47:13 +0200
commite6a17fcfdb96feb1a3ad4daf62e7b58abb543b88 (patch)
tree4ea685ec32694ac3455512fe72fe25dd02e8c9d5 /odb/relational/source.hxx
parent7470a1aeb62f13a9834c566c1bdafa53f80c78ac (diff)
Add init_value_extra hook to relational source generation
Diffstat (limited to 'odb/relational/source.hxx')
-rw-r--r--odb/relational/source.hxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx
index b2bf39b..e0b83d2 100644
--- a/odb/relational/source.hxx
+++ b/odb/relational/source.hxx
@@ -1210,7 +1210,7 @@ namespace relational
switch (ck)
{
case ck_ordered:
- {
+ {
if (ordered)
{
os << "// index" << endl
@@ -2039,6 +2039,11 @@ namespace relational
}
virtual void
+ init_value_extra ()
+ {
+ }
+
+ virtual void
traverse (type& c)
{
if (c.file () != unit.file ())
@@ -2598,8 +2603,11 @@ namespace relational
<< "if (l.locked ())"
<< "{"
<< "callback (db, obj, callback_event::pre_load);"
- << "init (obj, sts.image (), db);"
- << "load_ (sts, obj);"
+ << "init (obj, sts.image (), db);";
+
+ init_value_extra ();
+
+ os << "load_ (sts, obj);"
<< "sts.load_delayed ();"
<< "l.unlock ();"
<< "callback (db, obj, callback_event::post_load);"
@@ -2636,8 +2644,11 @@ namespace relational
<< "if (l.locked ())"
<< "{"
<< "callback (db, obj, callback_event::pre_load);"
- << "init (obj, sts.image (), db);"
- << "load_ (sts, obj);"
+ << "init (obj, sts.image (), db);";
+
+ init_value_extra ();
+
+ os << "load_ (sts, obj);"
<< "sts.load_delayed ();"
<< "l.unlock ();"
<< "callback (db, obj, callback_event::post_load);"