The NamingStrategy
was already being marked as deprecated in Hibernate 4.2/4.3 (HHH-7079). Starting with Hibernate 5, now it will shipped with two replacements(?) interfaces ImplictNamingStrategy
and PhysicalNamingStrategy
(HHH-7078) and have finally ditched support for the old NamingStrategy
. That's why Spring's upcoming Hibernate5 supported has even removed the configurer namingStrategy()
and favor of implicitNamingStrategy()
and physicalNamingStrategy()
. So far, so good.
Although it is mentioned in some documents (i.e. in the incomplete working-5.0-migration-guide.md) and in (generated) release notes for the upcoming Hibernate 5 (as of today), I've found no concrete example how to use these actually.
Perhaps I've missed something, but neither the JavaDoc nor the issues shows any evidence of the idea both strategy types. Furthermore I've already one strategy based on NamingStrategy
: a custom OracleNamingStrategy
which is based on the well-known one.
While I'm interested in a proper solution in code (obviously), the actual issue is getting a working migration document and/or the conceptual idea of the restructured naming strategy.
Also related:
OracleNamingStrategy
must be modified so that it implements thePhysicalNamingStrategy
. Was that your question? – ReadPhysicalNamingStrategy
the "successor" ofNamingStrategy
? HHH-9417 explains the topic very shortly; yeah it could be helpful. I'm still not convinced about 2-3 lines in an issue of many (that's no documentation). – TraditionImplicitNamingStrategy
. If your intention is to control how implicit/explicit ames are mapped to physical db tables/columns than you'll have to implement thePhysicalNamingStrategy
. If you need more information about the how and why you'll have to search the dev mailing list. Feel free to help them to update the documentation - it's an open source project. Contributors are welcome. – Read