Creating Unique Record Based on Two Relational Fields

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hey guys,

I am using the latest strapi and I have a collection which collects user responses. I have a collection of questions and essentially I want to make sure each user can only have one response to a single question. How do I do that?

Currently my Response collection has Many-To-One relation with Questions since Question can have many responses and it has same relationship with Users since Users can have many responses, but they can only have a single response per question. I am not sure how to achieve it in Strapi Backend and currently rely on simply managing this in front-end (next js app).

I would appreciate if someone could advise.

1 Like

This would be exactly the feature I need know in another context. I want to implement a scoring system wich scores one model along fixed dimensions of another without to give the possiblility to score the same relation twice… . Have you ever been able to solve it? I wonder if this issue is related to this github issue