Mosch
Mosch
DTDrizzle Team
Created by Mosch on 8/12/2024 in #help
defaultFn when using magic sql is not applying
When using "magic sql" and Inserting a row, the id isn't generated automatically. It only seem to work for me when calling the default Function manually
sql`INSERT INTO ${reminder} VALUES (${reminder.id.defaultFn()}, ${userId}, ${text}, ${dueDate})`
sql`INSERT INTO ${reminder} VALUES (${reminder.id.defaultFn()}, ${userId}, ${text}, ${dueDate})`
Is this an intended behaviour or am i missing something?
14 replies