Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit cff3927

Browse files
author
Dekel Barzilay
committed
Fixed syntax error on count with composite PK in MySQL
1 parent 95bb312 commit cff3927

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ class Service extends AdapterService {
366366
countQuery
367367
.joinRelation(query.$joinRelation)
368368
.countDistinct({ total: idColumns });
369+
} else if (idColumns.length > 1) {
370+
countQuery.countDistinct({ total: idColumns });
369371
} else {
370372
countQuery.count({ total: idColumns });
371373
}

0 commit comments

Comments
 (0)