@acodeninja/persist 3.0.0-next.25 → 3.0.0-next.26
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/package.json +1 -1
- package/src/Connection.js +5 -5
package/package.json
CHANGED
package/src/Connection.js
CHANGED
@@ -291,16 +291,16 @@ export default class Connection {
|
|
291
291
|
if (!modelsToDelete.includes(m.id)) modelsToDelete.push(m.id);
|
292
292
|
modelsToProcess.push(m);
|
293
293
|
} else {
|
294
|
-
const
|
294
|
+
const foundModelConstructor = this.#getModelConstructorFromId(m.id);
|
295
295
|
m[linkName] = undefined;
|
296
296
|
modelsToPut.push(m);
|
297
297
|
|
298
|
-
indexActions[
|
299
|
-
indexActions[
|
298
|
+
indexActions[foundModelConstructor.name] = indexActions[foundModelConstructor.name] ?? [];
|
299
|
+
indexActions[foundModelConstructor.name].push(['reindex', m]);
|
300
300
|
|
301
301
|
if (m.constructor.searchProperties().length) {
|
302
|
-
searchIndexActions[
|
303
|
-
searchIndexActions[
|
302
|
+
searchIndexActions[foundModelConstructor.name] = searchIndexActions[foundModelConstructor.name] ?? [];
|
303
|
+
searchIndexActions[foundModelConstructor.name].push(['reindex', m]);
|
304
304
|
}
|
305
305
|
}
|
306
306
|
}),
|