2

I'm moving from Hibernate to EclipseLink.

What I realized is, that Hibernates ddl-generation creates underscore-separated sql-columns for camel-case columns with

<property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.ImprovedNamingStrategy" />

in my persistence.xml. I like that a lot.

My question is: How can I get EclipseLink to do that?

Jonny

user871611
  • 3,307
  • 7
  • 51
  • 73

2 Answers2

2

I found a solution. You have to use the EclipseLink Session-Customizer class.
Explained here (with an example if you scroll down that page): http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg00094.html

Jonny

user871611
  • 3,307
  • 7
  • 51
  • 73
0

Fork this https://gist.github.com/iromu/6864061 . Numbers are not recognized as chars to be surrounded with underscores, you can override the mapping with @Column(name="")

iromu
  • 31
  • 3