From 39e1eab9d379f393ea5e396b79762b4d3d1a84a9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Sep 2014 14:27:33 +0200 Subject: Avoid clashes between nested composites in query columns --- common/composite/test.hxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'common') 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 -- cgit v1.1