Fergus Meiklejohn
02/07/2022, 4:08 AM{0: {}, 1: {}, 2: {} etc...}
Has there been discussion about returning an array instead? An array would be more useful than an object whose keys are just the position in an array anyway. We can get the array with Object.values I know but still it seems like an unnecessary step..ksuh
02/07/2022, 4:31 AMfindMany
, it does not return an object. It is an array.
https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findmanyFergus Meiklejohn
02/07/2022, 4:37 AMksuh
02/07/2022, 4:40 AMFergus Meiklejohn
02/07/2022, 4:45 AMawait db.chatRoom.findUnique({
where: { id: "123456789" },
include: {
comments: {
select: {
insertedAt: true,
id: true,
commentText: true,
user: true,
replies: {
select: {
insertedAt: true,
id: true,
commentText: true,
user: true,
replies: true,
},
},
},
},
},
});
nikolasburk
02/07/2022, 9:13 AM