fixes in attribute persistence + WIP on display of promoted attrs

This commit is contained in:
azivner
2018-08-06 08:59:26 +02:00
parent 194ce4f10f
commit 2aab3ad281
16 changed files with 138 additions and 37 deletions

View File

@@ -62,6 +62,12 @@ async function updateEntity(entity) {
delete clone.jsonContent;
for (const key in clone) {
if (clone[key] !== null && typeof clone[key] === 'object') {
clone[key] = JSON.stringify(clone[key]);
}
}
await sql.transactional(async () => {
await sql.replace(entity.constructor.tableName, clone);