不要怂,就是干,撸起袖子干!

Commit d028c823 by Harish K Committed by Sushant

fix: quote tableName alias as an identifier as it can contain schema (#8038)

1 parent 9521a353
Showing with 2 additions and 2 deletions
...@@ -958,9 +958,9 @@ const QueryGenerator = { ...@@ -958,9 +958,9 @@ const QueryGenerator = {
// resolve table name options // resolve table name options
if (options.tableAs) { if (options.tableAs) {
mainTable.as = this.quoteTable(options.tableAs); mainTable.as = this.quoteIdentifier(options.tableAs);
} else if (!Array.isArray(mainTable.name) && mainTable.model) { } else if (!Array.isArray(mainTable.name) && mainTable.model) {
mainTable.as = this.quoteTable(mainTable.model.name); mainTable.as = this.quoteIdentifier(mainTable.model.name);
} }
mainTable.quotedName = !Array.isArray(mainTable.name) ? this.quoteTable(mainTable.name) : tableName.map(t => { mainTable.quotedName = !Array.isArray(mainTable.name) ? this.quoteTable(mainTable.name) : tableName.map(t => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!