added read typed entity with foreign key
This commit is contained in:
@@ -16,6 +16,11 @@ public:
|
||||
foreign() = default;
|
||||
explicit foreign(Type *obj)
|
||||
: obj_(obj) {}
|
||||
foreign(const foreign&) = default;
|
||||
foreign& operator=(const foreign&) = default;
|
||||
foreign(foreign&&) noexcept = default;
|
||||
foreign& operator=(foreign&&) noexcept = default;
|
||||
~foreign() = default;
|
||||
|
||||
pointer operator->() { return obj_.get(); }
|
||||
const value_type* operator->() const { return obj_.get(); }
|
||||
@@ -24,7 +29,7 @@ public:
|
||||
const value_type& operator*() const { return *obj_; }
|
||||
|
||||
private:
|
||||
std::unique_ptr<value_type> obj_;
|
||||
std::shared_ptr<value_type> obj_;
|
||||
};
|
||||
|
||||
template<class Type, typename... Args>
|
||||
|
||||
Reference in New Issue
Block a user