I need to create an entity which must have an unique name in it's data.
exp:
{
name: "blabla",
...
}
I can handle it by reading the whole table and check if there is no object with that name and then create the entity, but what can I do with concurrency?
if someone else calls the create api in the same time and the same name it's not in db yet, then I can't notice it's a duplicate name, then we encounter a duplication.
any workaround for this situations?