1
      await this.prisma.fee_collections.findMany({
        where: whereClauseWithTransactionDateCondition,
        include: {
            student_master: {
                select: {
                    fee_start_month: true,
                }
            }
        }
    });

In my DB, fee_start_month column schema :

fee_start_month DateTime? @db.Date

At the fee_start_month column, some of the values are null so prisma2 unable to fetch those records, and It's thrown an exception.

Generated Error : [Nest] 21275 - 15/03/2021, 13:09:21 [ExceptionsHandler] Invalid prisma.fee_collections.findMany() invocation:

Value out of range for the type. The column fee_start_month contained an invalid DateTime value with either day or month set to zero. +3337ms

  • Looks like this is a known issue: https://github.com/prisma/prisma/issues/5006 – Donato Perconti Mar 23 '21 at 19:43
  • YES, Thank you for the comment. I update all blank DateTime column values with NULL & now it's working. My code logic problem - update the fee_start_month column with blank text. – Mayur Patil Mar 24 '21 at 06:21

0 Answers0