TypeError: Cannot read property 'databaseName' of undefined
See original GitHub issueIssue type: [x] bug report
Database system/driver:
[x] mssql
TypeORM version:
[x] latest
Steps to reproduce or a small repository showing the problem:
Here is a repo with the bug: https://github.com/victorschinaider/typeorm-bug
I think pagination+ embedded orderBy+ subquery + leftJoinAndSelect combination is giving me the problem.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:21
- Comments:30 (4 by maintainers)
Top Results From Across the Web
TypeORM: Cannot read property 'databaseName' of ...
TypeORM: Cannot read property 'databaseName' of undefined when trying to order-by field created after loadRelationCountAndMap.
Read more >typeorm cannot read properties of undefined - You.com
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >typeorm/typeorm - Gitter
... I have verified that the raw sql works, the problem is that I get the following error: "TypeError: Cannot read property 'databaseName'...
Read more >加油毛子的独家号- 开发者头条
阅读加油毛子分享的TypeError: Cannot read property 'databaseName' of undefined,就在开发者头条。
Read more >[Question] QueryBuilder - Issues with executing a query builder.
[Nest] 6940 - 2017-8-8 12:14:18 [ExceptionsHandler] Cannot read property 'databaseName' of undefined TypeError: Cannot read property ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, I just replaced
takewithlimitand it works for me.I have the same issues. As for me, it helps
In QueryBuilder use
qb.orderBy('categories.name', filter.orderDirection);Instead of column name from database.qb.orderBy('categories.my_name', filter.orderDirection);