You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using v0.3.28 this worked by generating a single query with OFFSET and LIMIT clauses (MySQL).
Actual Behavior
Using v0.3.29 the above now generates two queries - one to get distinct IDs and another to get the desired results.
This causes a performance and behaviour regression. Some queries I tested roughly doubled in total execution time.
Steps to reproduce
Any simple query as above.
My Environment
Dependency
Version
Operating System
Windows 11 Pro
Node.js version
24.15.0
Typescript version
6.0.3
TypeORM version
0.3.29
Additional Context
Firstly, thanks for your efforts on TypeORM!
The source of this issue looks to be #11987. @gioboa.
Should this change have been noted in the release notes?
My understanding from the TypeORM documentation is that offset and limit behave on the underlying query result set like the MySQL OFFSET and LIMIT clauses.
In contrast, QueryBuilder also supports pagination using take and skip, which understandably requires the 2-step query process.
The change made in v0.3.29 seem to break the power of offset and limit and duplicate the take and skip feature?
As the advanced query building interface of TypeORM, I'd think QueryBuilder should support generating single-query OFFSETLIMIT queries.
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
capacitor
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
Activity
dalexander-trc commentedon May 14, 2026
When can we expect this fix/rollback to go live? Wondering if we need to pin our repos to 0.3.28 until this is deployed.
gioboa commentedon May 14, 2026
If you are affected by this regression, as you mentioned, the best solution is to pin that version and wait the next patch release.