typeorm 0.3.27-dev.6965fa2 → 0.3.27-dev.f3c8d2f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/query-builder/SelectQueryBuilder.js +5 -0
- package/browser/query-builder/SelectQueryBuilder.js.map +1 -1
- package/browser/util/StringUtils.d.ts +1 -1
- package/browser/util/StringUtils.js +2 -2
- package/browser/util/StringUtils.js.map +1 -1
- package/package.json +1 -1
- package/query-builder/SelectQueryBuilder.js +5 -0
- package/query-builder/SelectQueryBuilder.js.map +1 -1
- package/util/StringUtils.d.ts +1 -1
- package/util/StringUtils.js +2 -2
- package/util/StringUtils.js.map +1 -1
|
@@ -904,6 +904,11 @@ export class SelectQueryBuilder extends QueryBuilder {
|
|
|
904
904
|
const hasOffset = this.expressionMap.offset !== undefined &&
|
|
905
905
|
this.expressionMap.offset !== null &&
|
|
906
906
|
this.expressionMap.offset > 0;
|
|
907
|
+
if (entitiesAndRaw.entities.length === 0 && (hasSkip || hasOffset)) {
|
|
908
|
+
// when skip or offset were used and no results found, we need to execute a full count
|
|
909
|
+
// (the given offset may have exceeded the actual number of rows)
|
|
910
|
+
return undefined;
|
|
911
|
+
}
|
|
907
912
|
// offset overrides skip when no join is defined
|
|
908
913
|
const previousResults = hasOffset
|
|
909
914
|
? this.expressionMap.offset
|