Hey guys, loving Prisma so far! Im a bit of an SQL...
# orm-help
j
Hey guys, loving Prisma so far! Im a bit of an SQL newbie though, and feeling a bit lost at the moment:
Copy code
model Match {
   id String @id
   team1 User[]
   team2 User[] 
 }

 model User {
   id String @id
   matches Match[]
 }
r
@John Benton ๐Ÿ‘‹ You can ask this here as well ๐Ÿ™‚ The issue is with you referencing the
User
model twice in
Match
but referencing the
Match
only once in
User
.
Could you explain what is it that youโ€™re trying to model?
j
I would like to model the concept of a Match (could be anything) containing 2 teams of users on my website ๐Ÿ™‚
But I think I missed a step, I should probably make a Team model as well
r
Yeah that would be better. Then reference the two teams in Match.