aspose file tools*
The moose likes Object Relational Mapping and the fly likes middlegen, dash/hyphen, underscore sign Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "middlegen, dash/hyphen, underscore sign" Watch "middlegen, dash/hyphen, underscore sign" New topic

middlegen, dash/hyphen, underscore sign

Stas Sokolov
Ranch Hand

Joined: Apr 13, 2004
Posts: 117

Middlegen removes _ and - signs when it generates mapping for a DB. Could it be configured. What if we do not need this type of names correction? Could it use the same names of tables and fields how DB administrator has defined. Otherwise developers some time are confused when writing quieries.

Good luck for yourself.
Stas Sokolov
Ranch Hand

Joined: Apr 13, 2004
Posts: 117

Found a solution.
Class to convert the names should be implemented as follow

and in ANT task you have to set the class name that is used
I agree. Here's the link:
subject: middlegen, dash/hyphen, underscore sign
Similar Threads
Generating Persistent Classes for Hibernate
Hibernate development tracks
One Mapping for two tables
Can anyone advice some good tool that auto-generates EJBs?
Middlegen and Hibernate