summaryrefslogtreecommitdiffstats
path: root/examples/dummyresource/dummystore.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-01 11:10:37 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-12-01 11:10:37 +0100
commit44edbee0f0b2fcf13e2ee388a90a8dd1f84a329e (patch)
tree71d265b2bce5a15981976e334ed182fa6d37c45f /examples/dummyresource/dummystore.cpp
parent377c86144221ffc5b49bdaa9b8dcc3507fe4a50f (diff)
downloadsink-44edbee0f0b2fcf13e2ee388a90a8dd1f84a329e.tar.gz
sink-44edbee0f0b2fcf13e2ee388a90a8dd1f84a329e.zip
Resolve remoteIds during sync
Remote id's need to be resolved while syncing any references. This is done by the synchronizer by consulting the rid to entity id mapping. If the referenced entity doesn't exist yet we create a local id anyways, that we then need to pick up once the actual entity arrives.
Diffstat (limited to 'examples/dummyresource/dummystore.cpp')
-rw-r--r--examples/dummyresource/dummystore.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/dummyresource/dummystore.cpp b/examples/dummyresource/dummystore.cpp
index 458695f..8592a30 100644
--- a/examples/dummyresource/dummystore.cpp
+++ b/examples/dummyresource/dummystore.cpp
@@ -64,9 +64,14 @@ QMap<QString, QMap<QString, QVariant> > populateMails()
64QMap<QString, QMap<QString, QVariant> > populateFolders() 64QMap<QString, QMap<QString, QVariant> > populateFolders()
65{ 65{
66 QMap<QString, QMap<QString, QVariant>> content; 66 QMap<QString, QMap<QString, QVariant>> content;
67 for (int i = 0; i < 5; i++) { 67 int i = 0;
68 for (i = 0; i < 5; i++) {
68 content.insert(QString("key%1").arg(i), createFolder(i)); 69 content.insert(QString("key%1").arg(i), createFolder(i));
69 } 70 }
71 i++;
72 auto folder = createFolder(i);
73 folder.insert("parent", "key0");
74 content.insert(QString("key%1").arg(i), folder);
70 return content; 75 return content;
71} 76}
72 77