Nested query fails because query by id is different between nested relations

I fell into this nested query and I'm not sure if I'm setting of the db right I have a User > Company > Testimonal relation which is tied together by the cuid() But when I check the data in prisma studio, the Company @id is different thatn the id in User. So I'm guessing that is the issue, but when I try to use where: { } by something else like userID instead of id It says id is required, and it doesn't work. I'm honestly stuck and have no idea how to move forward.
1 Reply
Viszy A
Viszy A9mo ago
This is the schema for those 3 models
Want results from more Discord servers?
Add your server