-->
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 can i add table comment to .java?
PostPosted: Thu Sep 15, 2005 11:53 pm 
Newbie

Joined: Thu Sep 15, 2005 11:43 pm
Posts: 1
for example.

i have the following table:

create table haha
(
JSBZ VARCHAR2(20),
SCBZ VARCHAR2(1)
)

-- Add comments to the table
comment on table haha
is 'dfa';
comment on column JSBZ
is 'jsbz dd';

Via Hibernate Tools, I can generate hbm.xml and .java

file.but i want the .java file set including comment info while generating

them.

/**
* dfa
*/
public class haha{
//jsbz dd
private String jsbz;

...
}

thx.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 16, 2005 3:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
create a directory with a subdirecty named pojo e.g. mytemplates/pojo.

copy the javaclass.vm template from the hibernate-tools.jar to this direcotry.

adjust the javaclass.vm to include whatever you want and then set templatepath in ant or eclipse which will allow the pojoexporter to see it.

_________________
Max
Don't forget to rate


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.