I searched, and did not find any solution.
if your answer is declaring an unique constraint on the top of entity (type) at Table annotation, I should say this not a solution, because when hibernate generate the database, randomly create one of this two unique constraints. I want a deterministic solution.
We already have a feature that tries to match unique constraints or unique indexes for primary keys to allow applying a custom name. We probably just missed one to one associations when doing that.
Please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.