Github user IsurangaPerera commented on the issue: https://github.com/apache/syncope/pull/70 That way replace won't work since it saves first (2 tokens exist.violate UNIQUE constraint) and deletes next. That way it will only delete the existing one which results in no token at all.
---