@sitecore/sc-contenthub-webclient-sdk 1.2.24 → 1.2.26

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.
@@ -204,7 +204,9 @@ let EntityBase = class EntityBase {
204
204
  guard_1.default.stringNotNullOrEmpty(name);
205
205
  const relation = this.getRelation(name, role, true);
206
206
  if (relation) {
207
- if (!relation.isFullyLoaded) {
207
+ if ((relation_1.RelationBase.isChildToManyParentsRelation(relation) ||
208
+ relation_1.RelationBase.isParentToManyChildrenRelation(relation)) &&
209
+ !relation.isFullyLoaded) {
208
210
  return (yield this._relationManager.loadRelationAsync(name, role, true));
209
211
  }
210
212
  }
@@ -22,6 +22,7 @@ const property_load_option_1 = require("../querying/property-load-option");
22
22
  const relation_load_option_1 = require("../querying/relation-load-option");
23
23
  const relation_specification_1 = require("../querying/relation-specification");
24
24
  const lazy_loading_manager_1 = require("./lazy-loading-manager");
25
+ const relation_1 = require("./relation");
25
26
  const relation_container_1 = require("./relation-container");
26
27
  class RelationManager {
27
28
  constructor(client, relations, entity) {
@@ -188,7 +189,10 @@ class RelationManager {
188
189
  this._relations[relation.name] = container;
189
190
  }
190
191
  if (container.relationExists(relation.role)) {
191
- if (container.getRelation(relation.role).isFullyLoaded === false) {
192
+ const relationInRole = container.getRelation(relation.role);
193
+ if ((relation_1.RelationBase.isChildToManyParentsRelation(relationInRole) ||
194
+ relation_1.RelationBase.isParentToManyChildrenRelation(relationInRole)) &&
195
+ !relationInRole.isFullyLoaded) {
192
196
  container.setRelation(relation);
193
197
  }
194
198
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore/sc-contenthub-webclient-sdk",
3
- "version": "1.2.24",
3
+ "version": "1.2.26",
4
4
  "description": "Sitecore Content Hub WebClient SDK.",
5
5
  "scripts": {
6
6
  "build": "npm run clean && npm run test && tsc && npm run lint",