summaryrefslogtreecommitdiffstats
path: root/common/synchronizer.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-09 17:27:29 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-09 17:27:29 +0200
commit555c373a0c4dfe386dcd2c88ae9548d95e307409 (patch)
tree57dd13d7e6d6b5c5929f15f4fafc19881deb84c0 /common/synchronizer.cpp
parent32a6f2ad3b66431c157e00ba5b1fb40c05e3c407 (diff)
downloadsink-555c373a0c4dfe386dcd2c88ae9548d95e307409.tar.gz
sink-555c373a0c4dfe386dcd2c88ae9548d95e307409.zip
Moved query logic to EntityReader to make it reusable in the resource.
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r--common/synchronizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp
index 1bac5d9..0314997 100644
--- a/common/synchronizer.cpp
+++ b/common/synchronizer.cpp
@@ -145,7 +145,7 @@ void Synchronizer::createOrModify(const QByteArray &bufferType, const QByteArray
145 sinkId, bufferType, entity, *adaptorFactory, [this](const QByteArray &buffer) { enqueueCommand(Sink::Commands::CreateEntityCommand, buffer); }); 145 sinkId, bufferType, entity, *adaptorFactory, [this](const QByteArray &buffer) { enqueueCommand(Sink::Commands::CreateEntityCommand, buffer); });
146 } else { // modification 146 } else { // modification
147 qint64 retrievedRevision = 0; 147 qint64 retrievedRevision = 0;
148 if (auto current = store().getLatest(mainDatabase, sinkId, *adaptorFactory, retrievedRevision)) { 148 if (auto current = EntityReaderUtils::getLatest(mainDatabase, sinkId, *adaptorFactory, retrievedRevision)) {
149 bool changed = false; 149 bool changed = false;
150 for (const auto &property : entity.changedProperties()) { 150 for (const auto &property : entity.changedProperties()) {
151 if (entity.getProperty(property) != current->getProperty(property)) { 151 if (entity.getProperty(property) != current->getProperty(property)) {