aboutsummaryrefslogtreecommitdiff
path: root/relationship
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-26 11:29:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-26 11:29:05 +0200
commit3506ef645e4cd26aebb73f493001d584e4cce22a (patch)
treebfc53872849a256861903a21daa55ebf097f0f39 /relationship
parentab994fdada3eebc794d6b1686f55a35420e4d758 (diff)
Make session optional
Diffstat (limited to 'relationship')
-rw-r--r--relationship/README7
-rw-r--r--relationship/makefile2
2 files changed, 5 insertions, 4 deletions
diff --git a/relationship/README b/relationship/README
index f3e4e9c..dd9f085 100644
--- a/relationship/README
+++ b/relationship/README
@@ -22,14 +22,15 @@ employee.sql
These files are generated by the ODB compiler from employee.hxx using the
following command line:
- odb -d <database> --generate-schema --generate-query \
+ odb -d <database> --generate-schema --generate-query --generate-session \
--default-pointer std::tr1::shared_ptr employee.hxx
Where <database> stands for the database system we are using, for example,
'mysql'.
- The --default-pointer option is used to make TR1 shared_ptr the default
- object pointer.
+ The --generate-session option is used to enable session support for all
+ the persistent classes in employee.hxx. The --default-pointer option is
+ used to make TR1 shared_ptr the default object pointer.
database.hxx
Contains the create_database() function which instantiates the concrete
diff --git a/relationship/makefile b/relationship/makefile
index 1ef0722..3e41f1d 100644
--- a/relationship/makefile
+++ b/relationship/makefile
@@ -46,7 +46,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) --generate-query \
---generate-schema --default-pointer std::tr1::shared_ptr \
+--generate-schema --generate-session --default-pointer std::tr1::shared_ptr \
--table-prefix relation_
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options)