-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 Feature: Relationship - unique index #5400
Comments
Hi, thank you for raising this. Opening it for the community to vote/leave their feedback on this as of now! |
Yes, very much needed! Another example would be a chatting app, I wanna make sure I cannot create twice the same "conversation". Instead of having to do first a query to make sure it doesn't exist yet, I would like the insert to be rejected by the database itself if the duo "from_id"/"friend_id" already exists |
🔖 Feature description
Allow to include the id of a relationship (many to one for example) in a unique index.
🎤 Pitch
Useful for a lot of use cases.
For example: An order can't have same product in two lines, so i need unique index (product_id, order_id)
collection: order_line
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: