From 15b1a95942518c84f8161c59820ea5d0e49a4e54 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 27 Apr 2012 11:36:43 +0200 Subject: Add support for NULL pointers to objects with composite object ids --- odb/common.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'odb/common.hxx') 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 -- cgit v1.1