Unique constraints defined in XML mapping files are not considered in the following cases:
UniqueKey: <property name="A" unique-key="A">
CompositeUniqueKey: <property name="A" unique-key="AB"> <property name="B" unique-key="AB">
Unique constraints defined in XML mapping files are wrongfully loaded in the following case:
CompositeUniqueKeyWithOneColumnTag: <property name="A" column="A" unique-key="AB"> <property name="B" unique-key="AB">
In this case a unique constraint for column A only is built.
Running unit tests are attached.
Hibernate 5.0.2
This bug is partly corresponding to
This and describe similar problems with the same piece of code. We will fix them together under