@acodeninja/persist 3.0.0-next.5 → 3.0.0-next.7
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
CHANGED
@@ -124,6 +124,10 @@ export default class StorageEngine {
|
|
124
124
|
const currentIndex = this._getIndex(currentModel.constructor);
|
125
125
|
|
126
126
|
await this._putIndex(currentModel.constructor, _.omit(currentIndex, [currentModel.id]));
|
127
|
+
|
128
|
+
const currentSearchIndex = this._getSearchIndex(currentModel.constructor);
|
129
|
+
|
130
|
+
await this._putSearchIndex(currentModel.constructor, _.omit(currentSearchIndex, [currentModel.id]));
|
127
131
|
}
|
128
132
|
|
129
133
|
/**
|
@@ -166,7 +170,10 @@ export default class StorageEngine {
|
|
166
170
|
.map(([propertyName, propertyType]) => [
|
167
171
|
registeredModelName,
|
168
172
|
propertyName,
|
169
|
-
typeof propertyType === 'function' &&
|
173
|
+
typeof propertyType === 'function' &&
|
174
|
+
!/^class/.test(Function.prototype.toString.call(propertyType)) &&
|
175
|
+
!Type.Model.isModel(propertyType) ?
|
176
|
+
propertyType() : propertyType,
|
170
177
|
])
|
171
178
|
.filter(([_m, _p, type]) => Type.Model.isModel(type))
|
172
179
|
.map(([containingModel, propertyName, propertyType]) => ({
|