Hey there, relatively new to Prisma. Is there a re...
# orm-help
j
Hey there, relatively new to Prisma. Is there a recommend way to insert a many to many relationship based off two previous inserts that both return unique ids. For example, insert a device and return the id, insert a boat and return the id, and then insert a provisonedDevice with two foreign keys as the boatId and deviceId. At any point of failure, I would want the complete transaction to fail (No device or boat to be inserted).
c
I've started using uuids for ids partly because you can generate them programmatically even on the client before doing an insert, plus they are more private and secure than using integers which leak data about your business.
👍 1
r
@Jeremy Scott 👋 What does your schema look like?