diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-27 15:16:49 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-27 15:16:49 +0200 |
commit | c12e7cba18fe4163563f1428626950a68a5d01d6 (patch) | |
tree | 0c1dfda1874aaf942304058f217ac9d1a77509c0 /common/no-id/test.hxx | |
parent | 23e2378ec92457368d59ab3837d828545c1de31f (diff) |
Add support for persistent classes without object ids
New pragma id (object). New test: common/no-id.
Diffstat (limited to 'common/no-id/test.hxx')
-rw-r--r-- | common/no-id/test.hxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common/no-id/test.hxx b/common/no-id/test.hxx new file mode 100644 index 0000000..3508d88 --- /dev/null +++ b/common/no-id/test.hxx @@ -0,0 +1,23 @@ +// file : common/no-id/test.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include <string> + +#include <odb/core.hxx> + +#pragma db object id() +struct object +{ + object () {} + object (unsigned long n, const std::string& s): num (n), str (s) {} + + unsigned long num; + std::string str; +}; + +#endif // TEST_HXX |