We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent feb6d60 commit 679c6ddCopy full SHA for 679c6dd
packages/drivers/mongo/src/index.ts
@@ -189,7 +189,7 @@ export class MongoDriver implements Driver {
189
190
// Map API document (id) to MongoDB document (_id) for update data
191
// But we should not allow updating the _id field itself
192
- const { id: _, ...updateData } = data;
+ const { id: _ignoredId, ...updateData } = data; // intentionally ignore id to prevent updating primary key
193
194
// Handle atomic operators if present
195
const isAtomic = Object.keys(updateData).some(k => k.startsWith('$'));
0 commit comments