@nhtio/lucid-resourceful 1.20251212.0 → 1.20251213.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.
@@ -46817,7 +46817,7 @@ var Application = class extends Macroable {
46817
46817
  */
46818
46818
  stubs = {
46819
46819
  create: async () => {
46820
- const { StubsManager } = await import("./manager-OLS5T3G7-DSQ-P0Pu.js");
46820
+ const { StubsManager } = await import("./manager-OLS5T3G7-Dwcf1c9T.js");
46821
46821
  return new StubsManager(this, this.makePath(this.rcFile.directories.stubs));
46822
46822
  }
46823
46823
  };
@@ -54453,25 +54453,23 @@ function withResourceful(options = {}) {
54453
54453
  `HasManyThrough relationship '${relationshipKey}' missing required through configuration`
54454
54454
  );
54455
54455
  }
54456
- const foreignColumn = throughModel.$keys.attributesToColumns.get(foreignKey);
54457
- const localColumn = this.$keys.attributesToColumns.get(localKey);
54458
- const throughForeignColumn = RelatedModel.$keys.attributesToColumns.get(throughForeignKey) || throughForeignKey;
54459
- const throughLocalColumn = throughModel.$keys.attributesToColumns.get(throughLocalKey) || throughLocalKey;
54460
- if (!throughLocalColumn || !throughForeignColumn || !foreignColumn || !localColumn) {
54456
+ const throughForeignKeyColumn = throughModel.$keys.attributesToColumns.get(foreignKey) || foreignKey;
54457
+ const throughLocalKeyColumn = throughModel.$keys.attributesToColumns.get(throughLocalKey) || throughLocalKey;
54458
+ const relatedThroughForeignKeyColumn = RelatedModel.$keys.attributesToColumns.get(throughForeignKey) || throughForeignKey;
54459
+ if (!throughForeignKeyColumn || !throughLocalKeyColumn || !relatedThroughForeignKeyColumn) {
54461
54460
  const missing = [
54462
- !throughLocalColumn ? "throughLocalColumn" : void 0,
54463
- !throughForeignColumn ? "throughForeignColumn" : void 0,
54464
- !foreignColumn ? "foreignColumn" : void 0,
54465
- !localColumn ? "localColumn" : void 0
54461
+ !throughForeignKeyColumn ? "throughForeignKeyColumn" : void 0,
54462
+ !throughLocalKeyColumn ? "throughLocalKeyColumn" : void 0,
54463
+ !relatedThroughForeignKeyColumn ? "relatedThroughForeignKeyColumn" : void 0
54466
54464
  ].filter((x) => x !== void 0);
54467
54465
  throw new E_INVALID_RELATIONSHIP_EXCEPTION(
54468
54466
  `HasManyThrough relationship '${relationshipKey}' has invalid key mappings. Missing: ${missing.join(", ")}`
54469
54467
  );
54470
54468
  }
54471
54469
  query.whereExists((subQuery) => {
54472
- subQuery.from(throughModel.table).select(1).where(`${throughModel.table}.${throughLocalColumn}`, uid).whereColumn(
54473
- `${throughModel.table}.${foreignColumn}`,
54474
- `${RelatedModel.table}.${throughForeignColumn}`
54470
+ subQuery.from(throughModel.table).select(1).where(`${throughModel.table}.${throughForeignKeyColumn}`, uid).whereColumn(
54471
+ `${throughModel.table}.${throughLocalKeyColumn}`,
54472
+ `${RelatedModel.table}.${relatedThroughForeignKeyColumn}`
54475
54473
  ).limit(1);
54476
54474
  });
54477
54475
  }
@@ -64971,7 +64969,7 @@ async function configure(command) {
64971
64969
  }
64972
64970
  ]);
64973
64971
  }
64974
- const version = "1.20251212.0";
64972
+ const version = "1.20251213.1";
64975
64973
  export {
64976
64974
  resourcefulColumn as a,
64977
64975
  resourcefulComputed as b,
@@ -64990,4 +64988,4 @@ export {
64990
64988
  version as v,
64991
64989
  withResourceful as w
64992
64990
  };
64993
- //# sourceMappingURL=index-yKiY_Hkh.js.map
64991
+ //# sourceMappingURL=index-CsrC5E9M.js.map