juanloco
12/19/2021, 3:35 PMJsonObject, E.G: see below. How would I do this if the model includes dates? I am currently getting an error due to a type mismatch since a JSON object doesn’t accept date values? but a date should just be parsed to a string I believe, do I need to do this manually so TS won’t complain?
model User { // user schema here}
import { User } from '@prisma/client';
const myObject: User = prisma.user.findUnique(// query here);
prisma.modelWithJsonField.create({
data: { jsonField: myObject }
});