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
If there are no other columns to update, then the column marked with @updatedAt is not changed, and the update/upsert call doesn't even access the database.
This behavior is not necessarily obvious and should be mentioned in the documentation. Such a documentation would have saved me the time to manually test the behavior just now (after I noticed a cache invalidation bug in my code because of this).
Suggested solution
Add this text:
If there are no other columns to update, then the column marked with @updatedAt is not changed, and the update/upsert call doesn't even access the database. If you want to ensure the column to be updated you need to manually set it in that case.
Problem
If there are no other columns to update, then the column marked with
@updatedAt
is not changed, and the update/upsert call doesn't even access the database.This behavior is not necessarily obvious and should be mentioned in the documentation. Such a documentation would have saved me the time to manually test the behavior just now (after I noticed a cache invalidation bug in my code because of this).
Suggested solution
Add this text:
To this documentation: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#updatedat
(Although I haven't checked the "and the update/upsert call doesn't even access the database" part.)
The text was updated successfully, but these errors were encountered: