Open scratchmex opened 3 years ago
I'm seeing a similar issue for a specific relationship (v0.2.37
)
@ManyToMany(() => UserEntity)
@JoinTable()
affectedUsers: UserEntity[]
When I try to query this like so:
db.findOneOrFail({ where: { id }, relations: ['affectedUsers'] })
This fails with ERROR: table name "ResourceAuthorizationPolicyEntity_ResourceAuthorizationPolicyEn" specified more than once
. However, when I use the query builder to leftJoinAndSelect
, all is fine.
I have same issue
@franzos @scratchmex Did you resolve your issue?
@franzos @scratchmex Did you resolve your issue?
To be honest I don't remember. This was long ago :/
Unfortunately no. I checked the commits; this happened during a major refactor, so no trace on how I fixed it.
Looking back, the error also seems unrelated to the specific query / column I mentioned; I'd suggest to double-check that you really don't have any overly long table, or column names.
This is related to https://github.com/typeorm/typeorm/issues/2661 but with a column name with less than 64 characters.
Issue Description
Expected Behavior
Query works.
Actual Behavior
Steps to Reproduce
Package.find({ relations: ["packageProducts", "packageSubtypes"] })
My Environment
Additional Context
On the version
0.2.34
of TypeORM, this bug does not exist.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?