-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to change generated class name?
PostPosted: Thu Mar 10, 2005 7:10 pm 
Newbie

Joined: Thu Mar 10, 2005 7:01 pm
Posts: 2
Hibernate version: Hibernate 3.0 rc 1 (28.02.2005)
Hibernate Tools 3.0 alpha 1 (24.01.2005) testing

Name and version of the database you are using: MySql 4.1.9

I'm using the Hibernate Tools, Eclipse 3.1 (M1), and the tools are working awesome! Very cool. I'm reverse engineering my MySql DB into POJOs.

Now I'd like to have a different name for my generated POJOs.
How can I specify to have a suffix or prefix to my generated Java class names?

I've successfully made a few changes to the Velocity Templates, but don't see how to change the class names.

Is the source code available for the Hibernate Tools? If so, I'll happily peruse the code to figure it out.

Thanks in Advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 12:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Myself and Max thanks for the compliments.

There is not currently a way to easily change names but there will be at somepoint in the future. There is a name mapping class that determine the names from the input item. This can be changed/enhanced. The code is available in the SF CVS repository so sure check it out and code away. Happy to look at any patches.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.