attr detail handles label/relation definition updates

This commit is contained in:
zadam
2020-07-18 23:45:28 +02:00
parent 9d46c7253b
commit df69b1d8dd
5 changed files with 190 additions and 98 deletions

View File

@@ -10,16 +10,16 @@ module.exports = () => {
tokens.push('promoted');
}
if (obj.labelType) {
tokens.push(obj.labelType);
}
if (obj.multiplicityType === 'singlevalue') {
tokens.push('single');
} else if (obj.multiplicityType === 'multivalue') {
tokens.push('multi');
}
if (obj.labelType) {
tokens.push(obj.labelType);
}
if (obj.numberPrecision) {
tokens.push('precision='+obj.numberPrecision);
}
@@ -38,16 +38,16 @@ module.exports = () => {
tokens.push('promoted');
}
if (obj.inverseRelation) {
tokens.push('inverse=' + obj.inverseRelation);
}
if (obj.multiplicityType === 'singlevalue') {
tokens.push('single');
} else if (obj.multiplicityType === 'multivalue') {
tokens.push('multi');
}
if (obj.inverseRelation) {
tokens.push('inverse=' + obj.inverseRelation);
}
const newValue = tokens.join(',');
sql.execute('UPDATE attributes SET value = ? WHERE attributeId = ?', [newValue, attr.attributeId]);