Naming Strategy Does not affect the user-specified index/foreign-key names

Description

Hello,

I have the following entity:

Now it all works good with Mysql and PostgreSQL but Oracle has this limit about 30 characters for columns, tables, indexes, foreign keys, etc. I tried specifying my own OraclePhysicalNamingStrategy and OracleImplicitNamingStrategy and the @UniqueConstraint's name is passed to my strategy so I can shrink it - BUT ONLY if I haven't specified explicit name.

The problem now is I have a platform with ~ 200 entities and relations where I have specified index names everywhere and I can't just delete them.

The same thing happens with @JoinColumn and @ForeignKey. As soon as I specify name for the foreign key it is no longer passed to the naming strategy so I cannot shrink it. But If I leave it like this:

then it is auto-generated and it is passed to the naming strategy where I can shrink it.

The discussion about this issue is here:

http://stackoverflow.com/questions/38565495/how-to-handle-the-ora-00972-identifier-is-too-long-exception-with-hibernate-5-a/

Environment

ubuntu, oracle 12c

Activity

Show:
Gail Badner
April 4, 2017, 5:07 AM

, , unfortunately only critical bugs and regressions are being backported to 5.1, so this issue will not be backported.

Vlad Mihalcea
March 1, 2017, 4:09 PM

I marked it as backportable, but decides which issues are to be backported.

Petar Tahchiev
March 1, 2017, 4:02 PM

Any plans to have this downported to 5.1?

Vlad Mihalcea
March 1, 2017, 3:46 PM

Fixed by extending the original Pull Request to all constraints.

Vlad Mihalcea
February 17, 2017, 1:40 PM

Oracle 12.2 introduces support for longer identifiers. But we should definitely support your proposal.

Fixed

Assignee

Vlad Mihalcea

Reporter

Petar Tahchiev

Fix versions

backPortable

Backport?