@onehat/data 1.16.0 → 1.16.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -988,7 +988,7 @@ export default class Repository extends EventEmitter {
988
988
  let entity = data;
989
989
  if (!(data instanceof Entity)) {
990
990
  // Create the new entity
991
- entity = Repository._createEntity(this.schema, data, this, isPersisted, originalIsMapped, isDelayedSave);
991
+ entity = Repository._createEntity(this.schema, data, this, isPersisted, originalIsMapped, isDelayedSave, this.isRemotePhantomMode);
992
992
  }
993
993
  this._relayEntityEvents(entity);
994
994
  this.entities.push(entity);
@@ -1026,7 +1026,7 @@ export default class Repository extends EventEmitter {
1026
1026
  return;
1027
1027
  }
1028
1028
 
1029
- const entity = Repository._createEntity(this.schema, data, this, isPersisted, originalIsMapped, isDelayedSave);
1029
+ const entity = Repository._createEntity(this.schema, data, this, isPersisted, originalIsMapped, isDelayedSave, this.isRemotePhantomMode);
1030
1030
 
1031
1031
  if (entity.isPhantom) {
1032
1032
  entity.createTempId();
@@ -1075,8 +1075,8 @@ export default class Repository extends EventEmitter {
1075
1075
  * @return {object} entity - new Entity object
1076
1076
  * @private
1077
1077
  */
1078
- static _createEntity = (schema, rawData, repository = null, isPersisted = false, originalIsMapped = false, isDelayedSave = false) => {
1079
- const entity = new Entity(schema, rawData, repository, originalIsMapped, isDelayedSave, this.isRemotePhantomMode);
1078
+ static _createEntity = (schema, rawData, repository = null, isPersisted = false, originalIsMapped = false, isDelayedSave = false, isRemotePhantomMode = false) => {
1079
+ const entity = new Entity(schema, rawData, repository, originalIsMapped, isDelayedSave, isRemotePhantomMode);
1080
1080
  entity.initialize();
1081
1081
  entity.isPersisted = isPersisted;
1082
1082
  return entity;