Describe the bug
If you have a collection with a 'has one and belongs to one' relation to the users table, (even if you set the connection field as unique, even on both sides) if a user posts a new entry for that collection, instead of a duplicate key error, the entry gets added and the old connection is removed and only the new one is kept.
Steps to reproduce the behavior
Create collection with one field being a one on one relation to Users, and select Unique Key (or don't, theoretically one on one should make it unique by default)
Add an entry for a user
Add another entry for the same user
Add as many entries as you want to the same user, it's not like strapi is gonna stop you...
Expected behavior
Some sort of error to be thrown, instead of allowing this to happen
Created by Derrick Mehaffy
·