Hi everyone! Is there a way to declare a one-to-on...
# orm-help
p
Hi everyone! Is there a way to declare a one-to-one relations in
datamodel.prisma
? Use case:
Copy code
type User {
  id: ID! @unique
  security: UserSecurity!
}

type UserSecurity {
  password: String!
  refreshTokens: [String!]!
  roles: [String!]!
}
s
It should work just like that. Are you seeing anything else?
p
I haven't tried yet, tbh 🙂 The code above is just to show the idea, but if you say it might work, it's definitely worth trying