mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fix: SelectQueryBuilder builds incorrectly escaped alias in Oracle when used on entity with composite key (#9668)
* Update SelectQueryBuilder.ts Bug fix, In case a unique alias is created in first query then result was not getting mapped properly. * lint fix --------- Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
This commit is contained in:
parent
f6a3ce732d
commit
83c6c0ed80
@ -3491,10 +3491,14 @@ export class SelectQueryBuilder<Entity extends ObjectLiteral>
|
||||
return metadata.primaryColumns
|
||||
.map((primaryColumn) => {
|
||||
const paramKey = `orm_distinct_ids_${index}_${primaryColumn.databaseName}`
|
||||
const paramKeyResult =
|
||||
DriverUtils.buildAlias(
|
||||
this.connection.driver,
|
||||
"ids_" + mainAliasName,
|
||||
primaryColumn.databaseName,
|
||||
)
|
||||
parameters[paramKey] =
|
||||
result[
|
||||
`ids_${mainAliasName}_${primaryColumn.databaseName}`
|
||||
]
|
||||
result[paramKeyResult]
|
||||
return `${mainAliasName}.${primaryColumn.propertyPath}=:${paramKey}`
|
||||
})
|
||||
.join(" AND ")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user