diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-04-27 11:36:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-04-27 11:36:43 +0200 |
commit | 15b1a95942518c84f8161c59820ea5d0e49a4e54 (patch) | |
tree | 0a2f6e60622c6085dba00d21e094944526f97d33 /odb/common.hxx | |
parent | 7e22a444bc360d1b74a25c6d508daea86ca8d5d2 (diff) |
Add support for NULL pointers to objects with composite object ids
Diffstat (limited to 'odb/common.hxx')
-rw-r--r-- | odb/common.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odb/common.hxx b/odb/common.hxx index bc45d00..082d78f 100644 --- a/odb/common.hxx +++ b/odb/common.hxx @@ -310,10 +310,17 @@ protected: member_path_, key_prefix_, (root_ != 0 && (root_id_ || root_op_))); } + bool + null () const + { + return (root_ != 0 && root_null_) || context::null (member_path_); + } + private: semantics::data_member* root_; // Root member if traversing from a member. bool root_id_; // True if traversing root as object id. bool root_op_; // True if traversing root as object pointer. + bool root_null_; // True if root is null-able. private: void |