diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-07 18:21:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-07 18:21:39 +0200 |
commit | c2bb4633ac31e1933908dc73476ce9ddffff8dad (patch) | |
tree | 0a6d14298e98e935a79822511cf3e214f62d3bfe /common/ctor/test.hxx | |
parent | cbe21006dde1501ccd1d9e28c2317f9346433be9 (diff) |
Add support for persistent classes without default ctors
New test: common/ctor.
Diffstat (limited to 'common/ctor/test.hxx')
-rw-r--r-- | common/ctor/test.hxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/common/ctor/test.hxx b/common/ctor/test.hxx new file mode 100644 index 0000000..3d08ed0 --- /dev/null +++ b/common/ctor/test.hxx @@ -0,0 +1,31 @@ +// file : common/ctor/test.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2010 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 +struct person +{ + person (const std::string& first, + const std::string& last, + unsigned short age) + : first_ (first), last_ (last), age_ (age) + { + } + + #pragma db id auto + unsigned long id_; + + std::string first_; + std::string last_; + unsigned short age_; +}; + +#endif // TEST_HXX |