Unique constraints are not considered correctly while loading from XML mapping file

Description

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.

Environment

Hibernate 5.0.2

Activity

Show:
F. Martin
October 20, 2015, 8:01 AM

This bug is partly corresponding to

Steve Ebersole
October 26, 2015, 6:51 PM

This and describe similar problems with the same piece of code. We will fix them together under

Assignee

Unassigned

Reporter

F. Martin

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure