diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-10 15:06:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-02-10 15:06:17 +0200 |
commit | c7d1b5f11a45319d71b6fe0929fc616a1640579f (patch) | |
tree | 30c82a9fa824ba3649da512826249fd7324b254b /mysql/truncation/test.hxx | |
parent | d19c5d874860575e1aa379d6e55409a16d4455a5 (diff) |
Use correct truncation vector in container loading code
Diffstat (limited to 'mysql/truncation/test.hxx')
-rw-r--r-- | mysql/truncation/test.hxx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/mysql/truncation/test.hxx b/mysql/truncation/test.hxx index b3128c0..b1aae1a 100644 --- a/mysql/truncation/test.hxx +++ b/mysql/truncation/test.hxx @@ -6,19 +6,15 @@ #define TEST_HXX #include <string> +#include <vector> + #include <odb/core.hxx> #pragma db object table ("test") struct object1 { - object1 (unsigned long id) - : id_ (id) - { - } - - object1 () - { - } + object1 () {} + object1 (unsigned long id): id_ (id) {} #pragma db id unsigned long id_; @@ -29,14 +25,8 @@ struct object1 #pragma db object table ("test") struct object2 { - object2 (unsigned long id) - : id_ (id) - { - } - - object2 () - { - } + object2 () {} + object2 (unsigned long id): id_ (id) {} #pragma db id unsigned long id_; @@ -44,4 +34,16 @@ struct object2 std::string str_; }; +#pragma db object +struct container +{ + container () {} + container (unsigned long id) : id_ (id) {} + + #pragma db id + unsigned long id_; + + std::vector<std::string> vec_; +}; + #endif // TEST_HXX |