From 635d11d74cd873e6f53d05b1d9f091ae112402a5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Apr 2012 16:48:03 +0200 Subject: Polymorphic inheritance support --- common/relationship-query/test.hxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'common/relationship-query/test.hxx') diff --git a/common/relationship-query/test.hxx b/common/relationship-query/test.hxx index c2e167c..671c849 100644 --- a/common/relationship-query/test.hxx +++ b/common/relationship-query/test.hxx @@ -111,8 +111,8 @@ struct employee: person #pragma db object pointer(shared_ptr) struct employer { - employer (const std::string& n) - : name (n) + employer (const std::string& n, shared_ptr nat) + : name (n), nationality (nat) { } @@ -122,6 +122,11 @@ struct employer #pragma db id std::string name; + + // The same member name and type as in person (test JOIN alias). + // + #pragma db not_null + shared_ptr nationality; }; #pragma db object pointer(shared_ptr) -- cgit v1.1