summaryrefslogtreecommitdiffstats
path: root/common/store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/store.cpp')
-rw-r--r--common/store.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/store.cpp b/common/store.cpp
index 392f9ce..33d7b51 100644
--- a/common/store.cpp
+++ b/common/store.cpp
@@ -209,6 +209,10 @@ KAsync::Job<void> Store::create(const DomainType &domainObject)
209template <class DomainType> 209template <class DomainType>
210KAsync::Job<void> Store::modify(const DomainType &domainObject) 210KAsync::Job<void> Store::modify(const DomainType &domainObject)
211{ 211{
212 if (domainObject.changedProperties().isEmpty()) {
213 SinkLog() << "Nothing to modify: " << domainObject.identifier();
214 return KAsync::null();
215 }
212 SinkLog() << "Modify: " << domainObject; 216 SinkLog() << "Modify: " << domainObject;
213 // Potentially move to separate thread as well 217 // Potentially move to separate thread as well
214 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier()); 218 auto facade = getFacade<DomainType>(domainObject.resourceInstanceIdentifier());
@@ -218,6 +222,10 @@ KAsync::Job<void> Store::modify(const DomainType &domainObject)
218template <class DomainType> 222template <class DomainType>
219KAsync::Job<void> Store::modify(const Query &query, const DomainType &domainObject) 223KAsync::Job<void> Store::modify(const Query &query, const DomainType &domainObject)
220{ 224{
225 if (domainObject.changedProperties().isEmpty()) {
226 SinkLog() << "Nothing to modify: " << domainObject.identifier();
227 return KAsync::null();
228 }
221 SinkLog() << "Modify: " << query << domainObject; 229 SinkLog() << "Modify: " << query << domainObject;
222 return fetchAll<DomainType>(query) 230 return fetchAll<DomainType>(query)
223 .each([=] (const typename DomainType::Ptr &entity) { 231 .each([=] (const typename DomainType::Ptr &entity) {