This commit is contained in:
Benjamin Toby
2024-12-28 19:27:02 +01:00
parent 92290f3796
commit a642034eea
2 changed files with 12 additions and 2 deletions
@@ -121,7 +121,17 @@ function sqlGenerator({ tableName, genObject }) {
return `'${mtch.targetLiteral}'`;
}
if (join.alias) return `${join.alias}.${mtch.target}`;
if (join.alias) {
return `${
typeof mtch.target == "object"
? mtch.target.tableName
: join.alias
}.${
typeof mtch.target == "object"
? mtch.target.fieldName
: mtch.target
}`;
}
return `${
typeof mtch.target == "object"