InnerJoin and InnerJoinAndSelect not working on nested object
See original GitHub issueIssue type:
[ ] question [ X] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
TypeORM version:
[X ] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
Steps to reproduce or a small repository showing the problem:
.createQueryBuilder('answerLog')
.innerJoin('answerLog.answer', 'answer')
.innerJoinAndSelect('answer.todo', 'todo')
I’m using this query to get the todo and select thad, but this query results in an answer undefined cause as you can see I’m not using innerJoinAndSelect
on the 'answer'
in my query. On the previous version of typeorm it was possible to do is, I don’t know if this is a change that was planned or something that broke?
I can easily solve this by doing:
.createQueryBuilder('answerLog')
.innerJoinAndSelect('answerLog.answer', 'answer')
.innerJoinAndSelect('answer.todo', 'todo')
But this will put unnecessary data in my result.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
yeap, so you expect anser to be inside todo, right? If yes, then you must select it.
Okay I already gave you answer. If you want something to be you need to select it.