From 4672ac30870fb3d8d0a5cdf3faa82291eaa322cb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 27 Jul 2015 17:37:10 +0200 Subject: Fix member name conflicts in query support --- common/query/basics/test.hxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'common/query/basics') diff --git a/common/query/basics/test.hxx b/common/query/basics/test.hxx index 94f4a6e..3e61c57 100644 --- a/common/query/basics/test.hxx +++ b/common/query/basics/test.hxx @@ -81,4 +81,38 @@ operator<< (std::ostream& os, const person& p) return os; } +// Test member name conflicts (compilation-only test). +// +#pragma db namespace table("t2_") +namespace test2 +{ + #pragma db object + struct object + { + #pragma db id + int id; + }; + + #pragma db value + struct value + { + object* m_object; + }; + + #pragma db value + struct bar + { + value m_value; + }; + + #pragma db object + struct foo + { + #pragma db id + int id; + + bar m_value; + }; +} + #endif // TEST_HXX -- cgit v1.1