remult 3.3.11 → 3.3.12
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.
|
@@ -329,10 +329,11 @@ export class ArrayEntityDataProvider {
|
|
|
329
329
|
let idf = this.entity.idMetadata.field;
|
|
330
330
|
if (!(idf instanceof CompoundIdField) &&
|
|
331
331
|
idf.valueConverter.fieldTypeInDb === 'autoincrement') {
|
|
332
|
-
|
|
332
|
+
const idDbName = names.$dbNameOf(idf);
|
|
333
|
+
j[idDbName] = 1;
|
|
333
334
|
for (const row of this.rows()) {
|
|
334
|
-
if (row[
|
|
335
|
-
j[
|
|
335
|
+
if (row[idDbName] >= j[idDbName])
|
|
336
|
+
j[idDbName] = row[idDbName] + 1;
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
else {
|
package/package.json
CHANGED
|
@@ -555,7 +555,7 @@ var ArrayEntityDataProvider = /** @class */ (function () {
|
|
|
555
555
|
};
|
|
556
556
|
ArrayEntityDataProvider.prototype.insert = function (data) {
|
|
557
557
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
558
|
-
var names, j, idf, _a, _b, row;
|
|
558
|
+
var names, j, idf, idDbName, _a, _b, row;
|
|
559
559
|
var e_16, _c;
|
|
560
560
|
var _this = this;
|
|
561
561
|
return tslib_1.__generator(this, function (_d) {
|
|
@@ -567,12 +567,13 @@ var ArrayEntityDataProvider = /** @class */ (function () {
|
|
|
567
567
|
idf = this.entity.idMetadata.field;
|
|
568
568
|
if (!(idf instanceof CompoundIdField_js_1.CompoundIdField) &&
|
|
569
569
|
idf.valueConverter.fieldTypeInDb === 'autoincrement') {
|
|
570
|
-
|
|
570
|
+
idDbName = names.$dbNameOf(idf);
|
|
571
|
+
j[idDbName] = 1;
|
|
571
572
|
try {
|
|
572
573
|
for (_a = tslib_1.__values(this.rows()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
573
574
|
row = _b.value;
|
|
574
|
-
if (row[
|
|
575
|
-
j[
|
|
575
|
+
if (row[idDbName] >= j[idDbName])
|
|
576
|
+
j[idDbName] = row[idDbName] + 1;
|
|
576
577
|
}
|
|
577
578
|
}
|
|
578
579
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|