Find options nested where
See original GitHub issueIssue type:
[ ] question [x] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
Steps to reproduce or a small repository showing the problem:
According to the docs here,
Querying a column from an embedded entity should be done with respect to the hierarchy in which it was defined. Example:
userRepository.find({ where: { name: { first: "Timber", last: "Saw" } } });
For me the parameters inside of the nested object are simply missing from the query.
My example:
db.getRepostiory(device)
.find({
where: {
group: {
id: groupId,
account: { id: accountId }
}
}
});
Here ‘accountid’ is left out of the generated query, and only ‘groupId’ is sent as a parameter.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:8 (2 by maintainers)
Top Results From Across the Web
sql - How to make complex nested where conditions with ...
I think you are mixing 2 ways of retrieving entities from TypeORM, find from the repository and the query builder.
Read more >typeorm-nested-where
Nested relations filtering for Typeorm repositories. ... Start using typeorm-nested-where in your project by running `npm i ...
Read more >Nested query options in select query - OData
Allowed system query options are $select and $expand, plus $filter, $search, $count, $orderby, $skip, and $top for collection-valued properties.
Read more >Smart Nested Populate
MikroORM is capable of loading large nested structures while maintaining good performance, querying each database table only once.
Read more >Relation queries (Concepts)
The following section shows the nested write options that are available per ... post records cannot be found: connect: [{ id: 8 },...
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 FreeTop 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
Top GitHub Comments
Nested
where
infind
is currently working. I had tested it in another issue. I’ll be marking this one as a duplicate of that issue.Duplicate of #2707