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
I'm not sure if this is related, but I just tried using a nested createMany to create a reference to a non-existent record through a link table, and Prismock did not throw when I expected it to. I don't have a full repro right now but the gist looks something like this:
Suppose you have models for Order and Item, and a Request model that describes items added to an order. Maybe a Request captures the quantity of a given item requested, a color/size/version, whatever; the point is you have a model that has a one-to-many relation with two other models. For simplicity, let's say submitting an order makes a new Request for each item:
This should make a new Request for each number in the itemIDs array. The problem is, what if an unknown item ID is in the array? I expected Prismock to throw in this case, but instead it creates a record with an invalid itemId value, and when you query the result, the linked Item record just comes back as null.
I saw over on #685 that "errors are not yet implemented", so I guess this all falls into the error-handling bucket?
https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#remarks-16
The text was updated successfully, but these errors were encountered: