@onehat/data 1.11.3 → 1.11.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Entity.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.11.3",
3
+ "version": "1.11.4",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/Entity.js CHANGED
@@ -975,7 +975,13 @@ class Entity extends EventEmitter {
975
975
  throw Error('this.getHash is no longer valid. Entity has been destroyed.');
976
976
  }
977
977
 
978
- const str = JSON.stringify(this.submitValues);
978
+ const str = JSON.stringify(_.merge({}, this.submitValues, {
979
+ // include Entity state in hash
980
+ isDestroyed: this.isDestroyed,
981
+ isPhantom: this.isPhantom,
982
+ isDirty: this.isDirty,
983
+ isTempId: this.isTempId,
984
+ }));
979
985
 
980
986
  // from https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
981
987
  const seed = 0;