aboutsummaryrefslogtreecommitdiff
path: root/evolution/soft-delete/model.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-04 13:40:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-17 12:04:03 +0200
commit59293cddb0d37a2bf37e579aa42da00fc9cfc5dc (patch)
tree04ef4bdda98286b0fe7b0f071434b4b32b7b9a6a /evolution/soft-delete/model.hxx
parenta53a1dc7361ac340d7942e5b41d72cb918ead2a7 (diff)
View versioning support
Diffstat (limited to 'evolution/soft-delete/model.hxx')
-rw-r--r--evolution/soft-delete/model.hxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/evolution/soft-delete/model.hxx b/evolution/soft-delete/model.hxx
index 78a4cfe..6abdd39 100644
--- a/evolution/soft-delete/model.hxx
+++ b/evolution/soft-delete/model.hxx
@@ -148,6 +148,36 @@ namespace MODEL_NAMESPACE(MODEL_VERSION)
#endif
}
+ // Test view with soft-deleted member.
+ //
+ #pragma db namespace table("t6_")
+ namespace test6
+ {
+ #pragma db object
+ struct object
+ {
+ object (unsigned long id = 0): id_ (id) {}
+
+ #pragma db id
+ unsigned long id_;
+
+ std::string str;
+ unsigned long num;
+ };
+
+ #pragma db view object(object)
+ struct view
+ {
+ std::string str;
+ unsigned long num;
+ };
+
+#if MODEL_VERSION == 3
+ #pragma db member(object::str) deleted(3)
+ #pragma db member(view::str) deleted(3)
+#endif
+ }
+
#endif // DATABASE_SQLITE
// Test soft-deleted container member in a non-versioned object.