Skip to content
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

InsertResult.identifiers all have the same id #3741

Closed
christophmayrhofer opened this issue Mar 1, 2019 · 2 comments
Closed

InsertResult.identifiers all have the same id #3741

christophmayrhofer opened this issue Mar 1, 2019 · 2 comments

Comments

@christophmayrhofer
Copy link

Issue type:

[ ] question
[ x ] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ x ] mysql / mariadb
[ ] oracle
[ ] 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:

I am trying to get the assigned ids for new entries in a requests table:

let { identifiers } = await createQueryBuilder().insert().into(Request).values(requests).execute()

Expected:
To get an array with objects having ids corresponding to the ids in the DB.

Actual:
The resulting array has objects that have all the same id even though the ids are different in the DB.
The ids are all the same as the id assigned to the first row.

@robck
Copy link

robck commented Mar 14, 2019

Looks like a duplicate of #2131

@Kononnable
Copy link
Contributor

Duplicate of #2131

@Kononnable Kononnable marked this as a duplicate of #2131 Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants