You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@thw0rted It's using gt. I'm completely new to prismock (and prisma and the entire tool chain) so I don't think I'll be able to spend the time reproducing it, unfortunately. What I can say, however, is that (1) this worked in version 1.33.6, and (2) by removing the where clause and inspecting the date field, I can confirm that it should match. I'm just guessing that it's the same bug as yours, but I'm not 100% sure.
Reproduction here
When creating a new record from a model with columns defined as
DateTime
, actualDate
instances are created. But when querying the same record afterwards, a copy of the date is created which has similar methods but does not passinstanceof Date
. This breaks libraries that rely oninstanceof
check to determine how to handle date/time values, likeclass-transformer
.The text was updated successfully, but these errors were encountered: