Peter Kellner
07/01/2021, 10:25 PMconst addedDate = new Date().toISOString();
const noteAdded = prisma.note.create({
data: {
description: description,
title: title,
active: 1,
createDate: addedDate,
noteChangeLogs: {
create: [
{
changeDate: addedDate,
operation: 'Created',
details: '',
},
],
},
},
include: {
noteChangeLogs: true, // Include all posts in the returned object
},
});
This was helpful: https://www.prisma.io/docs/concepts/components/prisma-client/relation-queriesRyan
08/12/2021, 6:30 AM