aboutsummaryrefslogtreecommitdiff
path: root/qt
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 /qt
parentab994fdada3eebc794d6b1686f55a35420e4d758 (diff)
Make session optional
Diffstat (limited to 'qt')
-rw-r--r--qt/README8
-rw-r--r--qt/makefile2
2 files changed, 6 insertions, 4 deletions
diff --git a/qt/README b/qt/README
index 99ec974..077edba 100644
--- a/qt/README
+++ b/qt/README
@@ -25,13 +25,15 @@ employee.sql
These files are generated by the ODB compiler from employee.hxx using the
following command line:
- odb -d <database> -p qt --generate-schema --generate-query employee.hxx
+ odb -d <database> -p qt --generate-schema --generate-query \
+ --generate-session employee.hxx
Where <database> stands for the database system we are using, for example,
'mysql'.
- The -p option is used to instruct the ODB compiler to load the Qt
- profile.
+ The -p option is used to instruct the ODB compiler to load the Qt profile.
+ The --generate-session option is used to enable session support for all
+ the persistent classes in employee.hxx.
database.hxx
Contains the createDatabase() function which instantiates the concrete
diff --git a/qt/makefile b/qt/makefile
index b798489..d7c6fef 100644
--- a/qt/makefile
+++ b/qt/makefile
@@ -55,7 +55,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database $(db_id) --profile qt \
---generate-query --generate-schema --table-prefix Qt
+--generate-query --generate-schema --generate-session --table-prefix Qt
$(gen): cpp_options := -I$(src_base)
$(gen): $(odb.l.cpp-options) $(odb_qt.l.cpp-options) $(qt_core.l.cpp-options)