Guys, good morning. How's everybody doing? I have ...
# orm-help
a
Guys, good morning. How's everybody doing? I have a little doubt here. My model has an
id
(
@id @default(uuid())
) and a code (an integer, unique). If I invoke
findUnique
and the
where
references only the id, I get a message that is similar to this thread: https://stackoverflow.com/questions/65998680/prisma-findunique-where-takes-only-one-unique-argument
m
Yes it takes only one argument. Every
id
and every
code
will be unique for that model. So you can search by either of them, but not both at the same time.