@sdflc/backend-helpers 1.0.93 → 1.0.95

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.
@@ -330,9 +330,10 @@ class BaseGateway {
330
330
  }
331
331
  const items = await query;
332
332
  if (items.length > 0 && this.config.noCache !== true) {
333
+ const idName = this.getIdFieldUpdateRemove();
333
334
  items.forEach((item) => {
334
- if (item[this.getIdField()]) {
335
- this.loader.clear(item[this.getIdField()]);
335
+ if (item[idName]) {
336
+ this.loader.clear(item[idName]);
336
337
  }
337
338
  });
338
339
  }
@@ -349,9 +350,10 @@ class BaseGateway {
349
350
  results.push(...items);
350
351
  }
351
352
  if (results.length > 0 && this.config.noCache !== true) {
353
+ const idName = this.getIdFieldUpdateRemove();
352
354
  results.forEach((item) => {
353
- if (item[this.getIdField()]) {
354
- this.loader.clear(item[this.getIdField()]);
355
+ if (item[idName]) {
356
+ this.loader.clear(item[idName]);
355
357
  }
356
358
  });
357
359
  }
@@ -366,9 +368,10 @@ class BaseGateway {
366
368
  }
367
369
  const items = await query;
368
370
  if (items.length > 0 && this.config.noCache !== true) {
371
+ const idName = this.getIdFieldUpdateRemove();
369
372
  items.forEach((item) => {
370
- if (item[this.getIdField()]) {
371
- this.loader.clear(item[this.getIdField()]);
373
+ if (item[idName]) {
374
+ this.loader.clear(item[idName]);
372
375
  }
373
376
  });
374
377
  }
@@ -383,9 +386,10 @@ class BaseGateway {
383
386
  }
384
387
  const items = await query;
385
388
  if (items.length > 0 && this.config.noCache !== true) {
389
+ const idName = this.getIdFieldUpdateRemove();
386
390
  items.forEach((item) => {
387
- if (item[this.getIdField()]) {
388
- this.loader.clear(item[this.getIdField()]);
391
+ if (item[idName]) {
392
+ this.loader.clear(item[idName]);
389
393
  }
390
394
  });
391
395
  }
@@ -450,9 +454,10 @@ class BaseGateway {
450
454
  }
451
455
  const items = await query;
452
456
  if (items.length > 0 && this.config.noCache !== true) {
457
+ const idName = this.getIdFieldUpdateRemove();
453
458
  items.forEach((item) => {
454
- if (item[this.getIdField()]) {
455
- this.loader.clear(item[this.getIdField()]);
459
+ if (item[idName]) {
460
+ this.loader.clear(item[idName]);
456
461
  }
457
462
  });
458
463
  }
@@ -324,9 +324,10 @@ class BaseGateway {
324
324
  }
325
325
  const items = await query;
326
326
  if (items.length > 0 && this.config.noCache !== true) {
327
+ const idName = this.getIdFieldUpdateRemove();
327
328
  items.forEach((item) => {
328
- if (item[this.getIdField()]) {
329
- this.loader.clear(item[this.getIdField()]);
329
+ if (item[idName]) {
330
+ this.loader.clear(item[idName]);
330
331
  }
331
332
  });
332
333
  }
@@ -343,9 +344,10 @@ class BaseGateway {
343
344
  results.push(...items);
344
345
  }
345
346
  if (results.length > 0 && this.config.noCache !== true) {
347
+ const idName = this.getIdFieldUpdateRemove();
346
348
  results.forEach((item) => {
347
- if (item[this.getIdField()]) {
348
- this.loader.clear(item[this.getIdField()]);
349
+ if (item[idName]) {
350
+ this.loader.clear(item[idName]);
349
351
  }
350
352
  });
351
353
  }
@@ -360,9 +362,10 @@ class BaseGateway {
360
362
  }
361
363
  const items = await query;
362
364
  if (items.length > 0 && this.config.noCache !== true) {
365
+ const idName = this.getIdFieldUpdateRemove();
363
366
  items.forEach((item) => {
364
- if (item[this.getIdField()]) {
365
- this.loader.clear(item[this.getIdField()]);
367
+ if (item[idName]) {
368
+ this.loader.clear(item[idName]);
366
369
  }
367
370
  });
368
371
  }
@@ -377,9 +380,10 @@ class BaseGateway {
377
380
  }
378
381
  const items = await query;
379
382
  if (items.length > 0 && this.config.noCache !== true) {
383
+ const idName = this.getIdFieldUpdateRemove();
380
384
  items.forEach((item) => {
381
- if (item[this.getIdField()]) {
382
- this.loader.clear(item[this.getIdField()]);
385
+ if (item[idName]) {
386
+ this.loader.clear(item[idName]);
383
387
  }
384
388
  });
385
389
  }
@@ -444,9 +448,10 @@ class BaseGateway {
444
448
  }
445
449
  const items = await query;
446
450
  if (items.length > 0 && this.config.noCache !== true) {
451
+ const idName = this.getIdFieldUpdateRemove();
447
452
  items.forEach((item) => {
448
- if (item[this.getIdField()]) {
449
- this.loader.clear(item[this.getIdField()]);
453
+ if (item[idName]) {
454
+ this.loader.clear(item[idName]);
450
455
  }
451
456
  });
452
457
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdflc/backend-helpers",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "description": "Set of helper functions and classes to simplify building backend apps within @sdflc ecosystem",
5
5
  "type": "commonjs",
6
6
  "exports": {