-->
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: hibernatetool-ant, howto include table comment in hbm maps
PostPosted: Tue Feb 14, 2006 2:50 am 
Newbie

Joined: Tue Feb 14, 2006 2:43 am
Posts: 5
hibernatetool M4, hibernate 3.1, oracle 10

Hi,
While doing reverse engineering (using jdbcconfiguration) with hibernatetools M4, I want to use the comments defined in the database (on table and column level), and put them in the .hbm mapping files and into the
generated java source files.

This is a snippet of my ant script.

<target name="reveng" depends="clean,init">
<hibernatetool destdir="${targetdir}" >

<jdbcconfiguration
propertyfile="hibernate.properties"

packagename="eu.europa.schengen.sis.cs.abstraction.domain"
reversestrategy="hib.MyReverseEngineeringStrategy"
revengfile="hibernate.reveng.xml"
/>
<hbm2hbmxml/>
<hbm2java jdk5="true" ejb3="false" />
<hbm2doc/>
</hibernatetool>

</target>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 14, 2006 3:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what is your database ? If it is oracle then you have to add a setting to the jdbc connection since oracle does not report it by default:

hibernate.connection.remarksReporting=true

enabling this will also make reveng sloooow since it apparently is tough for oracle to include the comments ;)

see http://opensource2.atlassian.com/projec ... se/HBX-453

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: hibernatetool
PostPosted: Tue Feb 14, 2006 4:08 am 
Newbie

Joined: Tue Feb 14, 2006 2:43 am
Posts: 5
Max,

This generates the comments in the table documentation, hbm2doc,
but I want it somewhere inside the .hbm file and also as a comment
in the sourcecode, so the developers know what this class is about.

Tony


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 14, 2006 4:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm i actually thought hbm did include them - apparently not.

open a jira for it.

i'm not totally keen on having the comment make it into the java class, but it could make sense to have it as a default if class-description is not there.

open another jira for that.

thanks.

btw. its easy to add, just customize the persistentclass.hbm and property.hbm template.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: change req
PostPosted: Tue Feb 14, 2006 5:31 am 
Newbie

Joined: Tue Feb 14, 2006 2:43 am
Posts: 5
change request see JIRA
http://opensource.atlassian.com/project ... se/HBX-594


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.