wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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
Don't get me started about those stupid light bulbs.
subject: middlegen, dash/hyphen, underscore sign
Similar Threads
Middlegen and Hibernate
Hibernate development tracks
Generating Persistent Classes for Hibernate
Can anyone advice some good tool that auto-generates EJBs?
One Mapping for two tables