Why am I not able to keep a value unique using Transactions?

I am trying to store a uniqe email using transactions, but I would always get more database entries than expected. I wrote a minimal example:


if I make the code non concurrent I get the expected result. Do you have any idea what I am doing wrong?

Which version are you using? In the most recent version, we have added upsert directive. So, your email predicate in the schema must declare that to do upserts.

1 Like

I missed that one in the docs. Thanks for the reply :slight_smile:

I just took a look at the upsert documentation and I think it should start with a definition of upsert.

I am not new to databases and I had to search google for its meaning.

Our docs are open source, do you want to help with a contribution?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.