-->
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.  [ 5 posts ] 
Author Message
 Post subject: How to customize generated java file format?
PostPosted: Mon Aug 15, 2005 2:51 pm 
Newbie

Joined: Thu Aug 11, 2005 12:02 am
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:[3.0]

[b]Mapping documents:[hbm]

[b]Code between sessionFactory.openSession() and session.close():


Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

How can we control the format of the java files generated from hbm2java? Can we change the indentation, or number of blank lines in the generated java code? Is there any template files for this purpose? Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 3:06 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
pojo/javaclass.vm

its in the jar, and you can provide your own templatepath with a repclemanet of this file.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 3:50 pm 
Newbie

Joined: Thu Aug 11, 2005 12:02 am
Posts: 6
Hi max, thanks you so much for your prompt reply. Could you please let me know where and how to specify the external path to such a vm template? Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 3:57 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
its in the docs...look for template path

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 6:47 pm 
Newbie

Joined: Thu Aug 11, 2005 12:02 am
Posts: 6
Thanks, max.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.