@teamkeel/functions-runtime 0.253.0 → 0.253.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/functions-runtime",
3
- "version": "0.253.0",
3
+ "version": "0.253.1",
4
4
  "description": "Internal package used by @teamkeel/sdk",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/applyJoins.js CHANGED
@@ -12,7 +12,7 @@ function applyJoins(context, qb, where) {
12
12
  return qb;
13
13
  }
14
14
 
15
- const srcTableName = context.tableName();
15
+ const srcTable = context.tableAlias();
16
16
 
17
17
  for (const key of Object.keys(where)) {
18
18
  const rel = conf[key];
@@ -33,7 +33,7 @@ function applyJoins(context, qb, where) {
33
33
  // and the foreign key is on the target table
34
34
  qb = qb.innerJoin(
35
35
  `${targetTable} as ${context.tableAlias()}`,
36
- `${srcTableName}.id`,
36
+ `${srcTable}.id`,
37
37
  `${context.tableAlias()}.${rel.foreignKey}`
38
38
  );
39
39
  break;
@@ -43,7 +43,7 @@ function applyJoins(context, qb, where) {
43
43
  // and the foreign key is on the source table
44
44
  qb = qb.innerJoin(
45
45
  `${targetTable} as ${context.tableAlias()}`,
46
- `${srcTableName}.${rel.foreignKey}`,
46
+ `${srcTable}.${rel.foreignKey}`,
47
47
  `${context.tableAlias()}.id`
48
48
  );
49
49
  break;