Talking about the inner | null here, it seems weir...
# orm-help
n
Talking about the inner | null here, it seems weird.. is there a case in which the post is returned, but the count isn’t for some reason?
r
@Nichita Z 👋 Could you share the query performed in this case?
n
Sure, it’s rather basic,
const transactionPost = await this.prismaService.post.findUnique({
where: { id: post.id },
include: {
_count: {
select: {
mediaContent: true
}
}
}
})
r
@Nichita Z 👋 This seems like a bug. Could you open an issue here so that we can look into this 🙂