@trudb/tru-common-lib 0.2.26 → 0.2.28
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.
|
@@ -1985,7 +1985,9 @@ class TruDataContext {
|
|
|
1985
1985
|
this._breezeContext = this.breezeContextFactory.createContext();
|
|
1986
1986
|
this.entityAccessor.context = this;
|
|
1987
1987
|
this.entityManager.entityChanged.subscribe((changeArgs) => {
|
|
1988
|
-
if (changeArgs.entityAction !== EntityAction.AttachOnQuery &&
|
|
1988
|
+
if (changeArgs.entityAction !== EntityAction.AttachOnQuery &&
|
|
1989
|
+
changeArgs.entityAction !== EntityAction.MergeOnQuery &&
|
|
1990
|
+
changeArgs.entityAction !== EntityAction.MergeOnSave) {
|
|
1989
1991
|
this.propertyChanged(changeArgs);
|
|
1990
1992
|
this.entityChangedHandler(changeArgs);
|
|
1991
1993
|
}
|
|
@@ -6809,7 +6811,7 @@ class TruDataChangeParser {
|
|
|
6809
6811
|
if (this.entityFoundByQuery(change)) {
|
|
6810
6812
|
var entityAlreadyInResults = this.getEntityFromResults(results, change);
|
|
6811
6813
|
if (!entityAlreadyInResults.length && this.isLoaded()) {
|
|
6812
|
-
this.addEntity(entity);
|
|
6814
|
+
this.addEntity(entity, true);
|
|
6813
6815
|
}
|
|
6814
6816
|
reloadResults = true;
|
|
6815
6817
|
}
|
|
@@ -6840,13 +6842,13 @@ class TruDataChangeParser {
|
|
|
6840
6842
|
newEntity[pkeyName] = change.tableRef;
|
|
6841
6843
|
this.applyPropertyChanges(change, newEntity);
|
|
6842
6844
|
if (this.isLoaded()) {
|
|
6843
|
-
this.addEntity(newEntity);
|
|
6845
|
+
this.addEntity(newEntity, true);
|
|
6844
6846
|
reloadResults = true;
|
|
6845
6847
|
}
|
|
6846
6848
|
}
|
|
6847
6849
|
else if (entity === localEntity) {
|
|
6848
6850
|
this.applyPropertyChanges(change, entity);
|
|
6849
|
-
this.addEntity(entity);
|
|
6851
|
+
this.addEntity(entity, true);
|
|
6850
6852
|
reloadResults = true;
|
|
6851
6853
|
}
|
|
6852
6854
|
}
|
|
@@ -6879,7 +6881,7 @@ class TruDataChangeParser {
|
|
|
6879
6881
|
if (entity) {
|
|
6880
6882
|
this.applyPropertyChanges(change, entity);
|
|
6881
6883
|
if (this.entityFoundByQuery(change) && this.isLoaded()) {
|
|
6882
|
-
this.addEntity(newEntity);
|
|
6884
|
+
this.addEntity(newEntity, true);
|
|
6883
6885
|
reloadResults = true;
|
|
6884
6886
|
}
|
|
6885
6887
|
}
|
|
@@ -6896,7 +6898,7 @@ class TruDataChangeParser {
|
|
|
6896
6898
|
newEntity[pkeyName2] = change.tableRef;
|
|
6897
6899
|
this.applyPropertyChanges(change, newEntity);
|
|
6898
6900
|
if (this.entityFoundByQuery(change) && this.isLoaded()) {
|
|
6899
|
-
this.addEntity(newEntity);
|
|
6901
|
+
this.addEntity(newEntity, true);
|
|
6900
6902
|
reloadResults = true;
|
|
6901
6903
|
}
|
|
6902
6904
|
}
|
|
@@ -7287,7 +7289,9 @@ class TruDataGrid {
|
|
|
7287
7289
|
}
|
|
7288
7290
|
return false;
|
|
7289
7291
|
};
|
|
7290
|
-
addEntity = (newEntity) => {
|
|
7292
|
+
addEntity = (newEntity, dataNotification = false) => {
|
|
7293
|
+
if (this.entity && dataNotification)
|
|
7294
|
+
return;
|
|
7291
7295
|
if (this.entity) {
|
|
7292
7296
|
newEntity[this.config.parentTableRelationshipRefName] = this.entity[this.config.parentTableRefName];
|
|
7293
7297
|
}
|