|
@@ -58,6 +58,8 @@ export default class DataModule extends BaseModule {
|
|
|
|
|
|
await this.loadModels();
|
|
|
|
|
|
+ await this.syncModelIndexes();
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -157,6 +159,17 @@ export default class DataModule extends BaseModule {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * syncModelIndexes - Sync indexes for all models
|
|
|
+ */
|
|
|
+ private async syncModelIndexes() {
|
|
|
+ if (!this.models) throw new Error("Models not loaded");
|
|
|
+
|
|
|
+ await Promise.all(
|
|
|
+ Object.values(this.models).map(model => model.syncIndexes())
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* getModel - Get model
|
|
|
*
|