If I pass an object with a property that has 'undefined' as the value, will it be ignored?
If I am updating or inserting data and passing an object, for instance:
Will ID be ignored and not set?
2 Replies
Yes, drizzle will actively ignore undefined values
Relevant code here https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm%2Fsrc%2Futils.ts#L112
GitHub
drizzle-orm/drizzle-orm/src/utils.ts at main · drizzle-team/drizzle...
Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅 - drizzle-team/drizzle-orm