@solidstarters/solid-core 1.2.81 → 1.2.83

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": "@solidstarters/solid-core",
3
- "version": "1.2.81",
3
+ "version": "1.2.83",
4
4
  "description": "This module is a NestJS module containing all the required core providers required by a Solid application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -53,7 +53,7 @@ export class CrudHelperService {
53
53
  }
54
54
  else { // Recursively call the applyFilters method to handle nested conditions
55
55
  const joinField = `${alias}.${key}`;
56
- if (!this.isRelationJoined(selectQb, joinField)) selectQb.leftJoin(joinField, key);
56
+ if (!this.isRelationJoined(selectQb, joinField)) selectQb.leftJoin(joinField, key);
57
57
  this.applyFilters(qb, primaryFilterObj, key, selectQb);
58
58
  }
59
59
  });
@@ -259,6 +259,11 @@ export class CrudHelperService {
259
259
  const joinAlias = relationParts.slice(0, i + 1).join('_');
260
260
  qb.leftJoinAndSelect(joinProperty, joinAlias);
261
261
  }
262
+ else {
263
+ // Since in populate, we are create a unique alias based on the relation path
264
+ //If the join is already present, it is probably because of the relation being passed in the where filter i.e applyFilters method
265
+ qb.addSelect(`${part}`);
266
+ }
262
267
  parentAlias = part; // Update the parent alias for the next iteration
263
268
  });
264
269
  return qb;
@@ -59,7 +59,7 @@ export class SecurityRuleSubscriber implements EntitySubscriberInterface<Securit
59
59
  }
60
60
  const metaData = await this.moduleMetadataHelperService.getModuleMetadataConfiguration(filePath);
61
61
 
62
- if (metaData.securityRule) {
62
+ if (metaData.securityRules) {
63
63
  const securityRuleIndex = metaData.securityRules?.findIndex((ruleFromFile: { name: string }) => ruleFromFile.name === securityRule.name);
64
64
  const {id, roleId, modelMetadataId, ...requiredDto} = await this.securityRuleRepo.toDto(securityRule)
65
65
  metaData.securityRules[securityRuleIndex] = {requiredDto, securityRuleConfig: JSON.parse(securityRule.securityRuleConfig)}