orchid-orm 1.9.17 → 1.9.18

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/dist/index.js CHANGED
@@ -1284,6 +1284,9 @@ const makeRelationQuery = (table, relationName, data, q) => {
1284
1284
  get() {
1285
1285
  var _a;
1286
1286
  const toTable = q.clone();
1287
+ if (this.query.joinRelationAs) {
1288
+ toTable._as(this.query.joinRelationAs);
1289
+ }
1287
1290
  const query = this.isSubQuery ? toTable : toTable._whereExists(
1288
1291
  this.baseQuery,
1289
1292
  (q2) => data.reverseJoin(this, toTable)