-->
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.  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: MyEclipse Hibernate tool vs. Hibernate Tools vs. Middlegen
PostPosted: Thu Oct 27, 2005 6:18 pm 
Newbie

Joined: Thu Oct 27, 2005 6:01 pm
Posts: 15
Hi all,

I need to generate Hibernate config files, mappings, and POJOs (preferably complete with XDoclet tags) from a fairly complex database schema in Informix (~200 tables). There are three tools I know that can do that (or some of that): MyEclipse Hibernate Support wizard, Hibernate Tools, and MiddleGen. Has anyone tried all three? Which one is the "smartest" in terms of intelligently mapping composite keys, foregn keys, lookup tables, association tables, etc.? Also, which one is the most flexible?

Any help will be greatly appreciated (especially since the alternative is writing all this stuff by hand ;-)

Environment:
Hibernate 3
JDK 5.0
Informix 7.31 UDB8
Eclipse 3.1 (with MyEclipse 4.0)

Gene

P.S. I hope this isn't a hot button issue for anyone :-)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2005 6:31 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
our dev env is identical to yours, except the informix version. i've used middlegen and hibernate tools. both of them will blow up if you are using the spatial datablade in informix.

I am not sure if middlegen does hibernate 3.0 but I know H tools does. We used Middlegen to get from db to hibernate mappings. the mappings were then converted to 3.0 and we now use H tools to go from mappings to Java. I would recommend H tools over middlegen, I have had far fewer frustrations w/ it and the annotations generation getting good as well.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 1:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Of course hibernate tools is better and more flexible ;)
(let me know if i'm wrong and i'll fix it ;)

dennis, what does "blow up if you are using the spatial datablade in informix" mean ? Define "blow up" ...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:18 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
this was one of my first topics on the forum http://forum.hibernate.org/viewtopic.ph ... highlight=

and it's not a complaint. i've sort of accepted the fact that every tool in the world just dies w/ spatial data types.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:54 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i answered in that thread - but just for the record it looks like any other rev.eng. tool that relies on jdbc metadata would fail on informix spatial blades.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:57 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
i know :(


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 11:29 am 
Newbie

Joined: Thu Oct 27, 2005 6:01 pm
Posts: 15
Dennis and Max, thanks for your input.

Dennis, you mentioned that "annotations are getting better" in H tools. I understand you are referring to EJB3/JSR-220 annotations. Is there an option in H Tools to generate XDoclet tags instead? I am rather wary of using JSR-220 annotations, both because the spec is not finalized yet, and because according to H Tools' own documentation, their support "is considered experimental and currently incomplete."

Gene


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 12:21 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
there is no support for xdoclet. hibernate tools generates w/ velocity templates, and there are options that allow you to override each velocity template and use your own. this would be your closest shot at getting xdoclet stuff. btw, max can answer these questions just as well or better than myself ;)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 12:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well it is definitly more complete than our xdoclet support which noone from the community have considered important enough to add (it should be trivial).

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 29, 2005 3:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Middlegen has support for H3 but the future is Hibernate tools as I am not doing all that much with the middlegen and (as time permits) futher effort into the hibernate tools will be my focus. There are others that are doing some work on the Middlegen side of things (and I have some work I have fiddled with that I might commit at some point). In anycase, I would go with Hibernate tools - XDoclet should not be hard to add if required. Maybe I will add it since I did the Middlegen side of things.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 31, 2005 11:56 am 
Newbie

Joined: Thu Oct 27, 2005 6:01 pm
Posts: 15
David, thanks for replying - it was great to hear from someone who is involved in both projects.

I think it would be great if you could add XDoclet support to H Tools. I do think it is an important feature, as many companies (especially those on the conservative side, such as my current client) will be reluctant to use an unfinished/unproven techology such as JSR-220 annotations for quite a while. XDoclet, on the other hand, is already widely used - and other parts of applications, beside Hibernate mappings generation.

Besides, choice is good, right? :-)

Gene


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 31, 2005 8:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The main reason it was not added was the valid view that annotations would be the future. You also have a valid point (which is why I started H3 support for middlegen [but it will not be expanding to far further than basic support]). I will have a look at starting to add it to Hibernate tools but don't expect it to suddenly all appear over night. You can help the process by creating the JIRA entry for it and we can see how it goes from there.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 7:10 am 
Newbie

Joined: Mon Jun 20, 2005 11:07 am
Posts: 16
Just for the record, I've tried Hibernate Tools to generate EJB3 annotations, but it couldn't generate relationship between the entities.
Do I have to override something, or configure something to achieve this??

Thanks in Advance and Best Regards

Rafael Mauricio Nami


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 7:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
probably because your db does not contain relationships

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 7:28 am 
Newbie

Joined: Mon Jun 20, 2005 11:07 am
Posts: 16
Well, this is something funny, because what I did was a common ERM with a bidirecional relation (product *-1 category),
that middlegen generated fine, but HT didn't (Product is being generated without a Category POJO, Category is being
generated without a List of Products).
Is it possible to do something like schemaexport from ejb3 annotations???

Thanks in advance and Best Regards

Rafael Mauricio Nami


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next

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.