Created
August 13, 2020 23:22
-
-
Save nmchenry01/7000b1048191123aab11d2d39afd8df1 to your computer and use it in GitHub Desktop.
Multiple filters example for "Prisma vs. TypeORM"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const findCompaniesThatMakeCarsOrDynamite = async (prisma: PrismaClient) => { | |
| return prisma.company.findMany({ | |
| where: { | |
| OR: [ | |
| { | |
| products: { | |
| some: { | |
| name: 'Car', | |
| }, | |
| }, | |
| }, | |
| { | |
| products: { | |
| some: { | |
| name: 'Dynamite', | |
| }, | |
| }, | |
| }, | |
| ], | |
| }, | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment