I am a big fan of creating at least the basic structure of your database from the domain model using hibernate. But if you work with Oracle you know on problem with this approach: the length of names is seriously limited for tables and columns. So if you have aÂ inner class with embeddables you pretty soon bump against that limit of 30 characters.
I published before an OracleNamingStrategy that fixes this problem by creating abbreviations on this blog. But writing a new blog entry with all the code every time I find a little glitch in the code felt just wrong. So I published it as an official Open Source Project over at google code: The Hibernate Naming Strategy for Oracle! And I just released the first version. and since it is so extremely simple, it isn't even a jar but a single java file.
I'd be glad if this is of some use for other developers. If you like it, drop me a line in the comments. If you find a bug or have an idea for improvement use the issue tracker.
Wan't to meet me in person to tell me how stupid I am? You can find me at the following events:
- Spring Data JDBC - New Kid on the block.
- Softwaredevelopment in the 21st century.
- Domain Driven Design mit Relationalen Datenbanken und Spring Data JDBC.
- Kerbal Space Program, Glücksspiel und Psychologie und was das mit dem (Berufs)leben zu tun hat.
- Javaland Freeletics
- Domain Driven Design mit relationalen Datenbanken und Spring Data JDBC
- The New Kid on the Block: Spring Data JDBC