Geebrox
09/12/2022, 2:41 PMconst card = await this.prismaService.card.findFirst({
where: {
locale: account.locale,
OR: [
{ AND: [{ isEmptyCard: false }, { accountId: account.id }] },
{ isEmptyCard: true },
],
},
});
I use this code, and when both OR
conditions are true, it returns the result of the last oneJoshua Ohlman
09/12/2022, 2:56 PMJoshua Ohlman
09/12/2022, 2:58 PMJoshua Ohlman
09/12/2022, 3:01 PMGeebrox
09/12/2022, 3:01 PMorderBy: { accountId: 'desc' },
this helped me. Thank you!Joshua Ohlman
09/12/2022, 3:01 PM