TreeRepository finds don't allow options
See original GitHub issueIssue type:
[ ] question [ ] bug report [ * ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
TypeORM version:
[ ] latest
[ ] @next
[*] 0.2.6
TreeRepository has useful methods such as findTrees, findRoots, etc. but these methods do not take find options like find does, limiting their use as you can’t filter or limit (sub)trees.
As an example I would like to find all tree roots which match some predicate (attached to a certain category) as well as only selecting the first N roots, and all of their descendants.
It also doesn’t seem to load relations, and there is no way to pass a relations parameter.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Class TreeRepository<Entity> - typeorm
Finds entities that match given find options. Also counts all entities that match given conditions, but ignores pagination settings (from and take options)....
Read more >TypeORM: Relations eager on tree entity - Stack Overflow
I use @Tree decorator with 'closure-table' type which allows me to have tree relation like Parent and Children. I get trees this way:...
Read more >TypeORM - Amazing ORM for TypeScript and JavaScript (ES7 ...
To use another database, simply change the type in the options to the database type you are using: mysql , mariadb , postgres...
Read more >TypeORM - Quick Guide - Tutorialspoint
TypeORM provides an option to create multiple database connection as well. ... nullable − Specify whether the database field / column allows null...
Read more >0.3.7 (2022-06-29) | TypeORM Docs
new where type signature in FindOptions (used in find* methods) now allows to build nested statements with conditional relations, for example:.
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
You can create your own method, here’s how I did mine
Then
Hope that helps
Open a PR with this feature bro, is very relevant feature.