aboutsummaryrefslogtreecommitdiff
path: root/common/relationship-query/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-23 16:48:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-23 16:48:03 +0200
commit635d11d74cd873e6f53d05b1d9f091ae112402a5 (patch)
tree49a9b835aecba11ff666a7d5c34fd1a248881e78 /common/relationship-query/test.hxx
parentadfa9c5ffccdd4e5db8c545d9106c0eb1d7bdcb8 (diff)
Polymorphic inheritance support
Diffstat (limited to 'common/relationship-query/test.hxx')
-rw-r--r--common/relationship-query/test.hxx9
1 files changed, 7 insertions, 2 deletions
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<country> 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<country> nationality;
};
#pragma db object pointer(shared_ptr)