diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-02 19:12:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-02 19:12:47 +0200 |
commit | 6465f0b9cf542cfd1fb77687cdad47fde28c9fad (patch) | |
tree | 970adf6cbf88a32ee94ffbc0a2065ee3d2e35f5c /common/view/test.hxx | |
parent | a06b917d661a61aad88dbf4351494b7c84273dc6 (diff) |
Handle object pointers when comparing view and object data member types
Also issues an error if an object member associated with a view member
is transient or inverse.
Diffstat (limited to 'common/view/test.hxx')
-rw-r--r-- | common/view/test.hxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/common/view/test.hxx b/common/view/test.hxx index b5b9d65..3812662 100644 --- a/common/view/test.hxx +++ b/common/view/test.hxx @@ -77,10 +77,10 @@ struct person #pragma db id unsigned long id; - #pragma db column ("first") + #pragma db column("first") std::string first_name_; - #pragma db column ("last") + #pragma db column("last") std::string last_name_; unsigned short age; @@ -383,10 +383,10 @@ struct view7 query (wife::husband.is_not_null ()) struct view8 { - #pragma db column (wife::first_name_) + #pragma db column(wife::first_name_) std::string wife_name; - #pragma db column (husb::first_name_) + #pragma db column(husb::first_name_) std::string husb_name; }; @@ -421,8 +421,17 @@ struct view11 { std::string last_name; - #pragma db column (person::measures.hight) + #pragma db column(person::measures.hight) unsigned short hight; }; +// +// Extract object pointer as object id. +// +#pragma db view object(person) +struct view12 +{ + std::string residence; +}; + #endif // TEST_HXX |