Hi, I have case where I have two entities `User` ...
# prisma-client
t
Hi, I have case where I have two entities
User
and
PhoneNumber
. Phone number can be assigned to only one User. When creating new User I need to assign a phone number, which is coming in request, for created user. The request must fail if phone number is already in use and I also need to take into account possible concurrent requests. My problem is that how I can check that phone number is not already in use? Is the Interactive transactions only way to achieve this?
r
@Tero Kujala đŸ‘‹ Yes that’s the only way I see as of now.
t
Okay, thank you