aboutsummaryrefslogtreecommitdiff
path: root/evolution/soft-add/model.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-10 14:03:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-17 12:04:03 +0200
commit86a83893351adef44574514c303aa880cf3b6d54 (patch)
tree706ba87b0bd2a8ffbdd3e1e55f6850a2119039cb /evolution/soft-add/model.hxx
parent22415f5ec7d53fbad4818ac31a42d6e623b8afa9 (diff)
Add soft-add/delete auto id test, LOB/long data test
Diffstat (limited to 'evolution/soft-add/model.hxx')
-rw-r--r--evolution/soft-add/model.hxx31
1 files changed, 29 insertions, 2 deletions
diff --git a/evolution/soft-add/model.hxx b/evolution/soft-add/model.hxx
index 1a7520a..50a7639 100644
--- a/evolution/soft-add/model.hxx
+++ b/evolution/soft-add/model.hxx
@@ -59,7 +59,11 @@ namespace MODEL_NAMESPACE(MODEL_VERSION)
};
#if MODEL_VERSION == 3
- #pragma db member(object::str) added(3)
+ // Make it a LOB for Oracle and long data for SQL Server.
+ //
+ #pragma db member(object::str) added(3) \
+ oracle:type("CLOB") \
+ mssql:type("VARCHAR(max)")
#pragma db member(object::vec) added(3)
#pragma db member(object::ptr) added(3)
#else
@@ -414,7 +418,30 @@ namespace MODEL_NAMESPACE(MODEL_VERSION)
};
#if MODEL_VERSION == 3
- #pragma db member(object::str) added(3) default("abc")
+ #pragma db member(object::str) added(3) default("abc") \
+ mysql:type("VARCHAR(255)")
+#else
+ #pragma db member(object::str) transient
+#endif
+ }
+
+ // Test soft-added member in an object with auto id.
+ //
+ #pragma db namespace table("t14_")
+ namespace test14
+ {
+ #pragma db object
+ struct object
+ {
+ std::string str;
+ unsigned long num;
+
+ #pragma db id auto
+ unsigned long id;
+ };
+
+#if MODEL_VERSION == 3
+ #pragma db member(object::str) added(3)
#else
#pragma db member(object::str) transient
#endif