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: Backward compatibility of Hibernate3 tools?
PostPosted: Mon Sep 25, 2006 10:31 am 
Newbie

Joined: Thu Sep 07, 2006 4:35 am
Posts: 9
Hi,
We have just migrated from Hibernate2 to Hibernate3 in our application. Our application involves generation of the hbm files and the java files through the ant tasks provided by Hibernate. We are encountering an issue with the naming of the properties in the java files and the hbms. The earlier version of Hibernate tools used generate the java files and hbm with some naming convention, and the current version generates the properties in camel-case. Because of this some of our use cases are failing where we had hardcoded the HQLs(which is a separate issue in itself).

Is there any way where we can specify Hibernate tools to generate the java and hbms files which will make it compatible with previous version? Specifically, can we tell Hibernate tools to use the same naming convention that it had used in the earlier version?

Any help is appreciated.
Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 25, 2006 8:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can implement a reverse engineering strategy instead of the standard one http://www.hibernate.org/hib_docs/tools/reference/en/html/reverseengineering.html#d0e1214
eg
http://www.hibernate.org/hib_docs/tools/reference/en/html/reverseengineering.html#custom-reveng-strategy.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 1:05 am 
Newbie

Joined: Thu Sep 07, 2006 4:35 am
Posts: 9
Thanks David. We had a look at the custom reverse engineering option and even implemented one. Works great :-)

However is this the only option that we have? I agree that it works, but we had thought of writing custom code as the last option. What we were looking for was something like using the "classic" package of Hibernate that is made available in HIbernate3 to let applications continue using the Hibernate2 features.

I am not sure whether such a "classic" package(or something similar) is available in Hibernate Tools, so just wanted a confirmation from the Hibernate team that writing custom reverse engineering strategy is the right approach to follow.

Thanks again.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 5:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
The code should definitly use the same naming conventions; and if it it doesn't its either:

1) something that were wrong ;)

2) a bug

So please let us know what specifically is wrong.

(and no, we don't have any "classic" implementaiton or similar since H3 Tools contains is a very different (and much more complete) codegeneration mechanism for Hibernate.

But this also allow us to be more flexible and e.g. provide integration points like the custom reverse engineering strategy to allow naming to work like you want (when reverse engineering that is ;)
(note: Hibernate 2 Tools did not include any reverse engineering, so not really sure what you are asking for ;)

p.s. I would like your input so we can weave out migration issues that can be removed and otherwise documented on our Hibernate Tools migration wiki page.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 10:02 am 
Newbie

Joined: Thu Sep 07, 2006 4:35 am
Posts: 9
Thanks Max for that detailed explanation. I will collect all the details and get back to you on this issue.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.