diff options
-rw-r--r-- | tests/entitystoretest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/entitystoretest.cpp b/tests/entitystoretest.cpp index 608de4c..5eee38a 100644 --- a/tests/entitystoretest.cpp +++ b/tests/entitystoretest.cpp | |||
@@ -39,6 +39,16 @@ private slots: | |||
39 | auto mail = ApplicationDomain::ApplicationDomainType::createEntity<ApplicationDomain::Mail>("res1"); | 39 | auto mail = ApplicationDomain::ApplicationDomainType::createEntity<ApplicationDomain::Mail>("res1"); |
40 | mail.setExtractedMessageId("messageid"); | 40 | mail.setExtractedMessageId("messageid"); |
41 | mail.setExtractedSubject("boo"); | 41 | mail.setExtractedSubject("boo"); |
42 | /* | ||
43 | * FIXME This triggers "Error while removing value: "f" "\n\xAE\xDC\xA8|xH\x92\x95\xCC\r\xA7\xAF\xDB}\x9E" "Error on mdb_del: -30798 MDB_NOTFOUND: No matching key/data pair found" Code: 4 Db: "resourceIdmail.index.draft"": | ||
44 | * | ||
45 | * We don't apply the defaults as we should initially, because we don't go via the flatbuffer file that contains the defaults in the first place. This results in this particular case in the draft flag to be invalid instead of false, and thus we end up trying to modify something different in the index than what we added originally. | ||
46 | * This is true for both create and remove. In the modify case we then get the correct defaults because we load the latest revision from disk, which is based on the flatbuffers file | ||
47 | * | ||
48 | * We now just use setDraft to initialize the entity and get rid of the message. We would of course have to do this for all indexed properties, | ||
49 | * but we really have to find a better solution than that. | ||
50 | */ | ||
51 | mail.setDraft(false); | ||
42 | 52 | ||
43 | auto mail2 = ApplicationDomain::ApplicationDomainType::createEntity<ApplicationDomain::Mail>("res1"); | 53 | auto mail2 = ApplicationDomain::ApplicationDomainType::createEntity<ApplicationDomain::Mail>("res1"); |
44 | mail2.setExtractedMessageId("messageid2"); | 54 | mail2.setExtractedMessageId("messageid2"); |