refs #527, JSON reading of value objects

* renamed simkey to modelstring
* allow parsing of stub objects (only foreign keys, not denormalized)
This commit is contained in:
Klaus Basan
2016-01-02 20:49:28 +01:00
parent c7121e3f9f
commit 5ab0173508
5 changed files with 26 additions and 13 deletions

View File

@@ -129,6 +129,13 @@ namespace BlackMisc
}
QString description(json.value(prefix + "description").toString());
if (description.isEmpty()) {
// stub, only key, maybe also timestamps
CDistributor distributorStub;
distributorStub.setKeyAndTimestampFromDatabaseJson(json, prefix);
return distributorStub;
}
QString alias1(json.value(prefix + "alias1").toString());
QString alias2(json.value(prefix + "alias2").toString());
Q_ASSERT_X(!description.isEmpty(), Q_FUNC_INFO, "Missing description");