prismock icon indicating copy to clipboard operation
prismock copied to clipboard

Date values on query results are not `instanceof Date`

Open thw0rted opened this issue 8 months ago • 4 comments

Reproduction here

When creating a new record from a model with columns defined as DateTime, actual Date instances are created. But when querying the same record afterwards, a copy of the date is created which has similar methods but does not pass instanceof Date. This breaks libraries that rely on instanceof check to determine how to handle date/time values, like class-transformer.

thw0rted avatar Feb 17 '25 21:02 thw0rted