mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed getCount for oracle alias case sensitivy
This commit is contained in:
parent
57793a1c9b
commit
96656cec25
@ -1145,10 +1145,10 @@ export class QueryBuilder<Entity> {
|
||||
|
||||
try {
|
||||
const results = await queryRunner.query(countQuerySql, countQueryParameters);
|
||||
if (!results || !results[0] || !results[0]["cnt"])
|
||||
if (!results || !results[0] || !results[0]["cnt"] || !results[0]["CNT"])
|
||||
return 0;
|
||||
|
||||
return parseInt(results[0]["cnt"]);
|
||||
return parseInt(results[0]["cnt"] ? results[0]["cnt"] : results[0]["CNT"]);
|
||||
|
||||
} finally {
|
||||
if (this.hasOwnQueryRunner()) // means we created our own query runner
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user