Is there a general way to tell JPA / Hibernate to convert all form column names to form:
EMAILADDRESS
to the form:
email_address
?
I would prefer not to use the @Column annotation for hundreds of columns. Hope someone thought about it;)
See Hibernate Reference Documenation - 3.6. Implementing NamingStrategy
The org.hibernate.cfg.NamingStrategy interface allows you to specify "standard naming" for database objects and schema elements.You can provide rules for automatically creating a database of identifiers from Java identifiers or for processing a "logical" column and table names specified in the mapping file in a "physical" table and column names. This function helps to reduce the verbosity of the cartographic document, eliminating repetitive noise (TBL_ for example, prefixes). By default, the strategy used by Hibernate is quite minimal. You can specify a different strategy by calling Configuration.setNamingStrategy () before adding the mappings: ...
The org.hibernate.cfg.NamingStrategy interface allows you to specify "standard naming" for database objects and schema elements.
You can provide rules for automatically creating a database of identifiers from Java identifiers or for processing a "logical" column and table names specified in the mapping file in a "physical" table and column names. This function helps to reduce the verbosity of the cartographic document, eliminating repetitive noise (TBL_ for example, prefixes). By default, the strategy used by Hibernate is quite minimal. You can specify a different strategy by calling Configuration.setNamingStrategy () before adding the mappings: ...
See also: http://www.javalobby.org/java/forums/t19838.html
Source: https://habr.com/ru/post/1311701/More articles:Can Silverlight and AJAX play additional roles or replace another? - user-interfaceVisual Basic 9 (or C # 3) with Visual Studio 2010 - vb.netCannot execute resignFirstResponder using UITextView - objective-cImplementing AJAX API backup from Google for local jQuery - jqueryCan Windows Azzure be installed on my own hardware? - cloudHow to repeat an array in PHP? - arraysFriends, templates, overload << - c ++How to organize files and folders SQL script - sqlAccessing instance variables from the NSTimer selector - objective-chttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1311706/bind-multiple-request-parameters-to-one-object-in-spring-3&usg=ALkJrhjJuv5owcinBSqUvfV-ZO7ozuaMoAAll Articles