-->
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.  [ 6 posts ] 
Author Message
 Post subject: I want to use my already created DAO and generate hbms
PostPosted: Fri Sep 29, 2006 1:13 am 
Beginner
Beginner

Joined: Tue Sep 19, 2006 5:46 am
Posts: 21
Location: india
hi all,

I am having DAO for all my tables and i have to use these classes and generate its hbm mapping files and cfg file entries. is it possible with hibernate tools.

OR

can we give user defined Names for our DAO classes generated with the hbm

Please help me , I am in big trouble.


Joseph C

_________________
JosephC


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 3:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I do not understand your question.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: can we give a name pattern for the Generated Persistent clas
PostPosted: Fri Sep 29, 2006 4:39 am 
Beginner
Beginner

Joined: Tue Sep 19, 2006 5:46 am
Posts: 21
Location: india
I want give a Naming pettern for the generated persistent class i.e the table name without undescores+"Value";

for example - the class name should be "UserDetailsTableValue"

_________________
JosephC


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 4:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
and you are doing reverse engineering ?

then the easiest for you is to use filepattern + a matching custom reverse engineering strategy for the table to classname method.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 8:53 am 
Beginner
Beginner

Joined: Tue Sep 19, 2006 5:46 am
Posts: 21
Location: india
thanks for the help..Max

Actually what i did is i just took the src code of DefaultReverseEngineeringStrategy and appended String "Value" to the method returning the name of the persistance class. compiled the class DefaultReverseEngineeringStrategy. extracted the hibernate-tools.jar, put the
DefaultReverseEngineeringStrategy.class in side the package org.hibernate.cfg.reveng; build the new hibernate-tools.jar and put it in the eclipse IDE classpath. now its generating the pattern i need . but is there a way were we can specify the custome made class externally.

Joseph.C

_________________
JosephC


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 29, 2006 9:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
eh yes- its is the custom reverse engineering strategy field on the reverse engineering page. and the revengstrategy attribute in ant.

_________________
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.  [ 6 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.