Hi,
I wrote a custom class extending the default PropertiesReverseCustomizer and
over rid the 2 methods as mentioned below:
@Override
public String getClassName(Table table, String defaultName) {
// TODO Auto-generated method stub
if(defaultName.indexOf('.') > -1)
return defaultName.substring(0,
defaultName.lastIndexOf('.')+1)+table.getName();
else
return table.getName();
}
@Override
public String getFieldName(ClassMapping dec, Column[] cols, ForeignKey
fk,
String defaultName) {
// TODO Auto-generated method stub
return cols[0].getName();
}
This works fine for me, please let me know whether this will cause any
undesired effects as i am not sure whether this is the proper solution.
Regards,
Ram
RamAESIS wrote:
>
> Hi,
>
> I am using the reverse mapping tool to generate classes from my tables.
> The tool by default changes the names of the DB fields by removing the
> underscores and changing the the case of subsequent character
> e.g. field name in DB ==== OB_AO_PD_VRS
>
> is changed to ===== ObAoPdVrs
>
> how to avoid this and force the tool to have the available name in
> database, i browsed through the customization section of Reverse Mapping
> tool but could not find a property. Any help is highly appreciated
>
> Regards,
> Ram
>
--
View this message in context:
http://n2.nabble.com/Regarding-field-names-of-persistent-classes-generated-tp2371154p2372160.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.