-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Issue type:
[ ] question
[ x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x ] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Bulk insert returns same item after insert:
await transaction.getRepository(RoleRoute)
.createQueryBuilder()
.insert()
.into(RoleRoute)
.values(
roleDto.routes.map(
id => ({ routeId: id, roleId: role.id})
)
)
.execute();
query: SELECT `RoleRoute`.`id` AS `RoleRoute_id`, `RoleRoute`.`created_at` AS `RoleRoute_created_at` FROM `role_route` `RoleRoute` WHERE `RoleRoute`.`id` = ? -- PARAMETERS: [27]
query: SELECT `RoleRoute`.`id` AS `RoleRoute_id`, `RoleRoute`.`created_at` AS `RoleRoute_created_at` FROM `role_route` `RoleRoute` WHERE `RoleRoute`.`id` = ? -- PARAMETERS: [27]
InsertResult {
identifiers: [ { id: 27 }, { id: 27 } ],
generatedMaps: [
{ id: 27, createdAt: 2020-04-29T18:22:45.000Z },
{ id: 27, createdAt: 2020-04-29T18:22:45.000Z }
],
raw: OkPacket {
fieldCount: 0,
affectedRows: 2,
insertId: 27,
serverStatus: 3,
warningCount: 0,
message: '&Records: 2 Duplicates: 0 Warnings: 0',
protocol41: true,
changedRows: 0
}
}
olosegres, alexanderK1987 and sonnylazuardi
Metadata
Metadata
Assignees
Labels
No labels