@onehat/data 1.21.2 → 1.21.5

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.21.2",
3
+ "version": "1.21.5",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1761,9 +1761,9 @@ class Entity extends EventEmitter {
1761
1761
  parentIds.push(parent.id);
1762
1762
  parent = parent.parent;
1763
1763
  }
1764
- if (parent.id !== this.id) {
1764
+ // if (parent.id !== this.id) {
1765
1765
  parentIds.push(parent.id); // add root id
1766
- }
1766
+ // }
1767
1767
 
1768
1768
  return parentIds.reverse().join('/');
1769
1769
  }
@@ -22,7 +22,7 @@ class AjaxRepository extends Repository {
22
22
  isRemote: true,
23
23
  isRemoteFilter: true,
24
24
  isRemoteSort: true,
25
- isPaginated: true,
25
+ isPaginated: !config.schema.model.isTree, // If it's a tree, don't paginate
26
26
 
27
27
  /**
28
28
  * @member {object} api - List of relative URIs to API endpoints.
@@ -432,6 +432,7 @@ class OneBuildRepository extends AjaxRepository {
432
432
  }
433
433
 
434
434
  const entity = this.createStandaloneEntity(root[0]);
435
+ entity.isPersisted = true;
435
436
  entity.isRemotePhantom = false;
436
437
  return entity;
437
438
  })