I have a question related to my Prisma Schema. Basically, I have a one-to-many relation between "Team" and "User", but I want "Team" to list the userIds only. Not the whole Array of users like User[] . The screenshot illustrates the existing solution where "Team" list an Array of Users[]. How can I only reference the userIds?
r
Ryan
06/01/2021, 6:48 AM
@Christian Kozalla 👋
This is how 1-many relations are modelled in Prisma. If you would like to fetch the user id’s you can do the following: