diff options
Diffstat (limited to 'evolution/soft-delete/model.hxx')
-rw-r--r-- | evolution/soft-delete/model.hxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/evolution/soft-delete/model.hxx b/evolution/soft-delete/model.hxx index 0a81116..9c99abe 100644 --- a/evolution/soft-delete/model.hxx +++ b/evolution/soft-delete/model.hxx @@ -7,6 +7,7 @@ #endif #include <string> +#include <memory> // std::auto_ptr #include <odb/core.hxx> #include <odb/vector.hxx> @@ -427,6 +428,36 @@ namespace MODEL_NAMESPACE(MODEL_VERSION) #endif } + // Test summarily deleted composite values. + // + #pragma db namespace table("t15_") + namespace test15 + { + #pragma db value + struct value + { + std::string str; + odb::vector<int> vec; + }; + + #pragma db object + struct object + { + object (unsigned long id = 0): id_ (id) {} + + #pragma db id + unsigned long id_; + + std::auto_ptr<value> v; + unsigned long num; + }; + +#if MODEL_VERSION == 3 + #pragma db member(value::str) deleted(3) + #pragma db member(value::vec) deleted(3) +#endif + } + // Test soft-deleted container member in a non-versioned object. // #pragma db namespace table("t21_") |