I need to map camel-case names to underscore-separated names in my current project, which uses EclipseLink, due to historical reasons. I know we can customize name mapping i
Instead of
directMapping.setFieldName(nameMap.get(oldFieldName ));
try:
directMapping.getField().resetQualifiedName(nameMap.get(oldFieldName));
This does the trick for me under EclipseLink 2.5.0