SM
SM
PPrisma
Created by SM on 4/30/2024 in #help-and-questions
How to write like query in mongodb prisma raw?
@kapa.ai
2 replies
PPrisma
Created by SM on 4/1/2024 in #help-and-questions
I need to convert find many query to find raw query...
@kapa.ai await this.prisma.incident.findMany({ where: { title: { contains: filter?.title }, createdDate: { lte: filter?.created?.date?.end, gte: filter?.created?.date?.start, }, modifiedDate: { lte: filter?.modified?.date?.end, gte: filter?.modified?.date?.start, }, ...(filter?.severity && filter?.severity.length > 0 ? { severity: { in: filter?.severity }, } : {}), ...(filter?.status && filter?.status.length > 0 ? { status: { in: filter?.status }, } : {}), ...(filter?.tags && filter?.tags.length > 0 ? { tags: { hasSome: filter?.tags }, } : {}), archive: false, }, include: { creator: true, modifier: true, notes: { include: { creator: true } }, }, orderBy: sortingData, }); can you write this in findRaw form?
2 replies