nnd.j
PPrisma
•Created by Nik on 4/15/2024 in #help-and-questions
@unique on optional field
Then I guess you need to create - relation
https://www.prisma.io/docs/orm/prisma-schema/data-model/relations/many-to-many-relations
20 replies
PPrisma
•Created by Nik on 4/15/2024 in #help-and-questions
@unique on optional field
Hey @Nik
Is there any reason why user/user_id is optional? It makes sense to be required as the player should not exists without associated user.
I believe the field cannot be both, optional and unique, if you want to keep it optional and still unique, you will be responsible for creating unique identifier for that entity
20 replies