-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
v6.0.5 insertMany #5179
Comments
I am not sure what you are reporting here. Your reproduction starts with a comment saying the code is a workaround? Also, it's a bit incomplete, e.g. no entity definition, ORM config, etc. Most importantly, there is no assert, so no notion of what you expect in the response, you don't even save the response anywhere... |
at EntityManager should be for function insertMany last return |
Describe the bug
when i insert only one record, because i expecting 1 or more items i use insertMany, but when i insert only one, then returned ids insertIds are undefined and it should return insertedId from response in array
{ affectedRows: 1, insertId: 1, row: { id: 1 }, rows: [ { id: 1 } ] }
Reproduction
// Works as a workaround
await em.insertMany(
Test,
[{
test: "test"
}],
);
What driver are you using?
@mikro-orm/postgresql
MikroORM version
6.0.5
Node.js version
v18.18.2
Operating system
mac
Validations
The text was updated successfully, but these errors were encountered: