Describe the bug
Cannot insert data when the id of the table is not named id in the database (at least using mssql)
To Reproduce
Steps to reproduce the behavior:
- Create any table with an id named something other than id (id_table for instance)
- perform an insert with repo.insert(obj)
- An error will be raised stating something about the id column not existing (which it doesn't)
Expected behavior
I can insert data into my database
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Firefox
- Version: latest
Additional context
There seems to be hardcoded id keys here and here
Changing both of these lines to respectively dbName instead of key and result[0][this.entity.idMetadata.field.dbName] instead of result[0].id seems to have fixed the problem locally for me, but I couldn't dig deeper to check all cases due to time constraints
This may or may not be local to mssql, tedious & knex
Describe the bug
Cannot insert data when the id of the table is not named id in the database (at least using mssql)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I can insert data into my database
Desktop (please complete the following information):
Additional context
There seems to be hardcoded id keys here and here
Changing both of these lines to respectively dbName instead of key and result[0][this.entity.idMetadata.field.dbName] instead of result[0].id seems to have fixed the problem locally for me, but I couldn't dig deeper to check all cases due to time constraints
This may or may not be local to mssql, tedious & knex