diff --git a/include/caosdb/entity.h b/include/caosdb/entity.h index 3a8f1f9effb149ced867b5012d38296278e9832f..b9718f45cd202ad456f4752d318340574adf3098 100644 --- a/include/caosdb/entity.h +++ b/include/caosdb/entity.h @@ -599,6 +599,7 @@ public: value.wrapped = this->wrapped->mutable_value(); properties.wrapped = this->wrapped->mutable_properties(); parents.wrapped = this->wrapped->mutable_parents(); + // FIXME(dh) copy messages? errors.wrapped = CreateMessagesField(); warnings.wrapped = CreateMessagesField(); infos.wrapped = CreateMessagesField(); @@ -611,6 +612,7 @@ public: value.wrapped = this->wrapped->mutable_value(); properties.wrapped = this->wrapped->mutable_properties(); parents.wrapped = this->wrapped->mutable_parents(); + // FIXME(dh) copy messages? errors.wrapped = CreateMessagesField(); warnings.wrapped = CreateMessagesField(); infos.wrapped = CreateMessagesField(); @@ -648,6 +650,7 @@ public: return this->warnings.wrapped->size() > 0; } [[nodiscard]] auto GetInfos() const -> const Messages & { return infos; } + [[nodiscard]] inline auto HasInfos() const -> bool { return this->infos.wrapped->size() > 0; } inline auto ToString() const -> const std::string { google::protobuf::util::JsonPrintOptions options;