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
I'm trying to insert data in a table with name Role_permissions from a TypeORM migration, but when I execute it, I get the message database_name.rolepermissions' doesn't exist.
Expected Behavior
I would expect a behavior of not changing the database name at all, since it makes an exception to be throwed.
Actual Behavior
TypeORM is modifying the case of the table name Role_permissions and removing underscores representing spaces, which causes the database engine to throw an error while trying to insert the data in the given table.
To be more specific, the table that TypeORM points to after doing the mentioned modifications in the table name is rolepermissions.
Steps to reproduce
Create a table with the name Role_permissions in a MySQL database, with the columns Role_id and Permission_id.
Create a migration to insert data in the table Role_permissions.
TypeORM will throw an error explaining the table rolepermissions does not exist.
My Environment
Dependency
Version
Operating System
Windows
Node.js version
20.11.1
Typescript version
4.9.5
TypeORM version
0.3.20
Nest.js version
9.4.3
Additional Context
No response
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, but I don't know how to start. I would need guidance.
The text was updated successfully, but these errors were encountered:
Issue description
I'm trying to insert data in a table with name
Role_permissions
from a TypeORM migration, but when I execute it, I get the messagedatabase_name.rolepermissions' doesn't exist
.Expected Behavior
I would expect a behavior of not changing the database name at all, since it makes an exception to be throwed.
Actual Behavior
TypeORM is modifying the case of the table name
Role_permissions
and removing underscores representing spaces, which causes the database engine to throw an error while trying to insert the data in the given table.To be more specific, the table that TypeORM points to after doing the mentioned modifications in the table name is
rolepermissions
.Steps to reproduce
Role_permissions
in a MySQL database, with the columnsRole_id
andPermission_id
.Role_permissions
.rolepermissions
does not exist.My Environment
Additional Context
No response
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, but I don't know how to start. I would need guidance.
The text was updated successfully, but these errors were encountered: