Easy prisma question, users or chatroomusers?
Unanswered
Chow Chow posted this in #help-forum
Chow ChowOP
I'm making a chat and i want to be sure what to use in my situation
prisma.chatroom. create
({data:{name,users
or
prisma.chatroom. create
({data:{name,Chatroomusers
prisma.chatroom. create
({data:{name,users
or
prisma.chatroom. create
({data:{name,Chatroomusers
1 Reply
Transvaal lion
I'd probably do
to not get confused with multiple "users" when accessing e.g.
Also I'm pretty sure you can remove
model Chatroom {
participants ChatroomUsers[]
}
to not get confused with multiple "users" when accessing e.g.
chatroom.chatroomusers[user]
.Also I'm pretty sure you can remove
users User[]
from Chatroom
(and vice versa), since you have ChatroomUsers
in the middle, which is connected to User
aswell as Chatroom