H2Dialect (Hibernate Test Templates) on Windows 7
Extract the ZIP und run the testcase with mvn test.
It currently uses Hibernate 5.0.10 (see pom file, adapt for testing with other versions like 4.3.11, 5.2.2, 5.1.1).
The included HBM mapping file uses a list mapping with a many-to-many element and unique="true".
Please observe the log output for the schema generation:
While Hibernate 4.3.11 generates the following unique constraint correctly
"alter table test_workflowitem_childs add constraint UK_ojsoe2oi4ydfh13jnq8cv1k3 unique (child)"
the Hibernate 5 versions do not generate this unique constraint which is a regression I think.
If it's confirmed as a bug it would be great if it could be fixed in Hibernate 5.0.x as we currently migrate a big application from 3 to 5.0.x. Thanks!
Fixed in master, 5.1, and 5.0 branches.