@MrDell - it seems to me that Prisma may be complaining because you can't enforce uniqueness on a passed-in string. I'm watching the topic for clarification.
@Edun omatseye If I can piggy-back on this question (because I'm in a similar place) - what do you do if you need to create a record and then another record which references it, and you want to do it in a transaction?
If the foreign key of B references the id of A, then you have to have the id of A to create the record for B.
It seems to me that if you can define the PK on A and use it as the FK on B, then you can put both queries in a $transaction. But if you can't, then you have to wait for the return from the creation of A to create B.