@abaplint/runtime 2.7.4 → 2.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/types/table.js +10 -1
- package/package.json +1 -1
package/build/src/types/table.js
CHANGED
|
@@ -129,13 +129,22 @@ class HashedTable {
|
|
|
129
129
|
}
|
|
130
130
|
buildHashFromSimple(data) {
|
|
131
131
|
let hash = "";
|
|
132
|
+
const rowType = (0, clone_1.clone)(this.getRowType());
|
|
132
133
|
for (const k of this.options.primaryKey.keyFields) {
|
|
133
134
|
let val = data[k.toLowerCase()];
|
|
134
135
|
if (val instanceof structure_1.Structure) {
|
|
135
136
|
val = val.getCharacter();
|
|
136
137
|
}
|
|
137
138
|
else {
|
|
138
|
-
|
|
139
|
+
// convert to correct type, eg Chars have specific length, or rounding,
|
|
140
|
+
if (k === "TABLE_LINE") {
|
|
141
|
+
rowType.set(val.get());
|
|
142
|
+
val = rowType.get();
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
rowType.get()[k.toLowerCase()].set(val.get());
|
|
146
|
+
val = rowType.get()[k.toLowerCase()].get();
|
|
147
|
+
}
|
|
139
148
|
}
|
|
140
149
|
hash += k + ":" + val + "|";
|
|
141
150
|
}
|