-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to find entities with the same many-to-one relationship? #2552
Comments
You can find nested relationships like so:
|
That is correct and works. Thank you. |
I'm trying to do something like that, but I do not get results, I do not know if it has anything to do with the scope of the relationship at the time of the consultation
|
I had the same issue and added Turns out the tables were prefixed with two underscores by typeorm, so I could hack a solution saying { __station: { city: { id: cityId } } } as a |
Issue type:
[x] question
[ ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
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:
Having a many-to-one one-to-many relationship between two entities...
Fuel
andStation
for example:I want to find all fuels with the same station id.
What I've tried and it doesn't work:
The text was updated successfully, but these errors were encountered: