aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-09-19 14:27:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-09-19 14:27:33 +0200
commit39e1eab9d379f393ea5e396b79762b4d3d1a84a9 (patch)
treeb2be79c489db2cea1dc92ba912b94ef199a2ced3
parentb985defe92ab9107fa857d2c32b7d5182b351344 (diff)
Avoid clashes between nested composites in query columns
-rw-r--r--common/composite/test.hxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/common/composite/test.hxx b/common/composite/test.hxx
index 8bf4b97..5dad274 100644
--- a/common/composite/test.hxx
+++ b/common/composite/test.hxx
@@ -219,4 +219,33 @@ namespace test4
}
}
+// Test composite name clashes in query columns (compilation test)
+//
+#pragma db namespace table("t5_")
+namespace test5
+{
+ // Class-member conflict.
+ //
+ #pragma db value
+ struct value {int value_;};
+
+ // Class-class conflict.
+ //
+ #pragma db value
+ struct inner {int value;};
+
+ #pragma db value
+ struct outer {inner value;};
+
+ #pragma db object
+ struct object
+ {
+ #pragma db id
+ int id;
+
+ outer value;
+ test5::value v;
+ };
+}
+
#endif // TEST_HXX