Hello,
I encounter an issue with the @Unique annotation. The annotation was added on a given field itemID (String), important point : the annotation was added afterwards (after objects were already added to the table). As a consequence the unique constraint is not taken into account when persisting an object which itemID is already present no error is thrown at commit, the object is just added to the table. It is a problem as we rely on the commit error to know when adding or updating object in table. This error was previously encountered in similar conditions with another table, it was solved only after recreating a blank table and adding all entities one by one in it (so using the new scheme for all entities).
So the question is simple, is there a better way to "re-activate" the @Unique constraint on all object already present in the table, including those made before annotation was added?
Thank you.