You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.myRepo.createQueryBuilder('mainAlias')
.innerJoin('mainAlias.secondaryTable', 'secondaryAlias')
.where(parsedParams.where)
.orderBy(parsedParams.order)
.getMany();
// parsedParams.order would look like
{
'secondaryAlias.someAttribute': ASC
}
and TypeORM understands the orderBy clause correctly, and orders by 'secondaryAlias.someAttribute'
when i try the same approach with the .where() clause it fails on EntityColumnNotFound.
why?
how can i use the .where(ObjectLiteral) variation and filter by a join table's attribute?
Expected Behavior
support sending an object litertal to .where() clause containing filters on not-main alias.
Actual Behavior
typeorm raises EntityColumnNotFound exception.
Steps to Reproduce
// insert code here
My Environment
Dependency
Version
Operating System
Node.js version
v12.20.0
Typescript version
v3.9.7
TypeORM version
v0.2.29
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
Yes, I have the time, but I don't know how to start. I would need guidance.
No, I don't have the time, although I believe I could do it if I had the time...
No, I don't have the time and I wouldn't even know how to start.
The text was updated successfully, but these errors were encountered:
Issue Description
using QueryBuilder im able to:
and TypeORM understands the orderBy clause correctly, and orders by
'secondaryAlias.someAttribute'
when i try the same approach with the .where() clause it fails on EntityColumnNotFound.
why?
how can i use the .where(ObjectLiteral) variation and filter by a join table's attribute?
Expected Behavior
support sending an object litertal to .where() clause containing filters on not-main alias.
Actual Behavior
typeorm raises EntityColumnNotFound exception.
Steps to Reproduce
// insert code here
My Environment
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: