Hibernate is not creating unique constraint specified in @JoinTable

Description

Hi,

When using join table for many to many relationship i have specified unique constraint, but the same has not been created in Database.

Here is my entity definition :-

The unique constraint that i have added to the join table is not getting created in Postgresql.

Any unique constraint at entity level with @table is working fine.

Here is the config :-

jdbc.connection.datasource=org.postgresql.ds.PGSimpleDataSource
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

Update1 :- Also not working for Oracle 11G
Update2 :- Also not working for SqlServer 2016

Environment

Postgresql, Linux, Spring Data JPA Repository, Oracle 11g

Status

Assignee

Unassigned

Reporter

Avinash G A

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure