openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RamAESIS <>
Subject Re: Regarding field names of persistent classes generated
Date Mon, 23 Feb 2009 13:49:55 GMT


I wrote a custom class extending the default PropertiesReverseCustomizer and
over rid the 2 methods as mentioned below:

	public String getClassName(Table table, String defaultName) {
		// TODO Auto-generated method stub
		if(defaultName.indexOf('.') > -1)
			return defaultName.substring(0,
			return table.getName();

	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.


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:
Sent from the OpenJPA Developers mailing list archive at

View raw message