© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
3 replies
rodrigo

Insert multiple rows + onConflictDoUpdate

Is it possible to insert multiple rows (array) and at the same time using the onConflictDoUpdate?
I'm trying it out but I get this error:
TypeError: Cannot read properties of undefined (reading 'name')
    at ghh5w224esf.js:70758:77
    at Array.flatMap (<anonymous>)
    at SQLiteAsyncDialect.buildUpdateSet (ghh5w224esf.js:70757:36)
    at SQLiteInsert.onConflictDoUpdate (ghh5w224esf.js:70637:186)
    at D1_DB.pushCourse (ghh5w224esf.js:79896:65)
    at OrgCourseService.insertCoursesFromNtnIntoD1 (ghh5w224esf.js:79874:36)
    at async action2 (ghh5w224esf.js:58503:35)
    at async callRouteActionRR (ghh5w224esf.js:3315:16)
    at async callLoaderOrAction (ghh5w224esf.js:2436:16)
    at async submit2 (ghh5w224esf.js:2080:25) {
  stack: TypeError: Cannot read properties of undefined (re…16)
    at async submit2 (ghh5w224esf.js:2080:25),
  message: Cannot read properties of undefined (reading 'name')
}
TypeError: Cannot read properties of undefined (reading 'name')
    at ghh5w224esf.js:70758:77
    at Array.flatMap (<anonymous>)
    at SQLiteAsyncDialect.buildUpdateSet (ghh5w224esf.js:70757:36)
    at SQLiteInsert.onConflictDoUpdate (ghh5w224esf.js:70637:186)
    at D1_DB.pushCourse (ghh5w224esf.js:79896:65)
    at OrgCourseService.insertCoursesFromNtnIntoD1 (ghh5w224esf.js:79874:36)
    at async action2 (ghh5w224esf.js:58503:35)
    at async callRouteActionRR (ghh5w224esf.js:3315:16)
    at async callLoaderOrAction (ghh5w224esf.js:2436:16)
    at async submit2 (ghh5w224esf.js:2080:25) {
  stack: TypeError: Cannot read properties of undefined (re…16)
    at async submit2 (ghh5w224esf.js:2080:25),
  message: Cannot read properties of undefined (reading 'name')
}
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

insert multiple rows - onConflictDoUpdate
Drizzle TeamDTDrizzle Team / help
2y ago
Multiple `onConflictDoUpdate()`
Drizzle TeamDTDrizzle Team / help
2y ago
Insert multiple rows return order
Drizzle TeamDTDrizzle Team / help
2y ago
Insert Schemas with onConflictDoUpdate
Drizzle TeamDTDrizzle Team / help
3y ago