@karmaniverous/entity-manager 4.1.0 → 4.2.1
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,14 +330,14 @@ class EntityManager {
|
|
|
330
330
|
} = this.getKey(entityToken, component);
|
|
331
331
|
return [...new Set([...keys, ...(0, _inspectParametersDeclaration.getParametersNames)(encode)]).values()];
|
|
332
332
|
}, []));
|
|
333
|
-
const
|
|
333
|
+
const indexProperties = (0, _zipObject2.default)(indexKeys, value.split(delimiter));
|
|
334
334
|
return indexComponents.reduce((index, component) => {
|
|
335
335
|
const {
|
|
336
336
|
encode
|
|
337
337
|
} = this.getKey(entityToken, component);
|
|
338
338
|
return {
|
|
339
339
|
...index,
|
|
340
|
-
[component]: encode(
|
|
340
|
+
[component]: encode(indexProperties)
|
|
341
341
|
};
|
|
342
342
|
}, {});
|
|
343
343
|
}
|
|
@@ -372,8 +372,8 @@ class EntityManager {
|
|
|
372
372
|
delete newItem[shardKeyToken];
|
|
373
373
|
|
|
374
374
|
// Remove keys.
|
|
375
|
-
(0, _forEach2.default)(keys, (
|
|
376
|
-
delete newItem[key];
|
|
375
|
+
(0, _forEach2.default)(keys, (value, key) => {
|
|
376
|
+
if (!value.retain) delete newItem[key];
|
|
377
377
|
});
|
|
378
378
|
_classPrivateFieldGet(this, _entityManager).logger.debug('done', newItem);
|
|
379
379
|
return newItem;
|
|
@@ -306,11 +306,11 @@ export class EntityManager {
|
|
|
306
306
|
}, [])
|
|
307
307
|
);
|
|
308
308
|
|
|
309
|
-
const
|
|
309
|
+
const indexProperties = _.zipObject(indexKeys, value.split(delimiter));
|
|
310
310
|
|
|
311
311
|
return indexComponents.reduce((index, component) => {
|
|
312
312
|
const { encode } = this.getKey(entityToken, component);
|
|
313
|
-
return { ...index, [component]: encode(
|
|
313
|
+
return { ...index, [component]: encode(indexProperties) };
|
|
314
314
|
}, {});
|
|
315
315
|
}
|
|
316
316
|
|
|
@@ -343,8 +343,8 @@ export class EntityManager {
|
|
|
343
343
|
delete newItem[shardKeyToken];
|
|
344
344
|
|
|
345
345
|
// Remove keys.
|
|
346
|
-
_.forEach(keys, (
|
|
347
|
-
delete newItem[key];
|
|
346
|
+
_.forEach(keys, (value, key) => {
|
|
347
|
+
if (!value.retain) delete newItem[key];
|
|
348
348
|
});
|
|
349
349
|
this.#entityManager.logger.debug('done', newItem);
|
|
350
350
|
|