diff --git a/include/caosdb/entity.h b/include/caosdb/entity.h index ec773b8b0e7a3209b181e2dc0789aadb1232f6a4..d66c377e57e9e23f61315d58fee647032f39b5a8 100644 --- a/include/caosdb/entity.h +++ b/include/caosdb/entity.h @@ -601,6 +601,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(); @@ -613,6 +614,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(); @@ -650,6 +652,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;