Nested update with updateMany
does not update the updatedAt timestamps for related records properly
#8265
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
team/client
Issue for team Client.
Milestone
Bug description
Hi, we found an issue with the updated_at timestamp not getting updated when we use
updateMany
in a nested update. When we update order with its children order lines by using the nested update, the timestampsupdated_at
on the order lines do not get updated automatically with@updatedAt
specified in the schema. I do not see an issue reported in here. Did I miss anything or this is a known issue?How to reproduce
prisma.order.update
to update the order with nested updateupdateMany
to update its order line records, eg, update thesku
to have a new value.Here is the test cases,
The first test passed while the second one failed as the updated_at field was not updated.
Expected behavior
The order line record should have an updated value for
updated_at
field when it was updated in the nested update. But theupdated_at
field in the order line record does not get updated accordingly even when the other fiedls are updated properly for the order line.Prisma information
This is the schema,
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: