-->
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: First time user...where begin?!
PostPosted: Mon Sep 08, 2003 1:48 pm 
Newbie

Joined: Mon Sep 08, 2003 1:45 pm
Posts: 3
It would be a good helper for the Hibernate very newbies users if we can count with a document or tutorial that shows step by step the use of this framework.

I was traying to generate the classes and the hbm.xml files from getting the information directly from database using Middlegen...I downloaded Middlegen then I try to find some information about how can use it...then I find that there is some pluging / example under middlegen-hibernate-rc1...I donloaded and installed this plugin, but I couldn't find any information about what I must change or what can I quit from this sample in order to use it for my needs...I found some data on Community Area > Middlegen for Hibernate, but it didn't helpme too much...Perhaps I am missing something or I more acustomizes to other graphical tools (i.e: Cayenne modeler, toplink)...I dont have problems on use line commands but having a quick start guide coud save a lot of time for the first time users and increase ths users interest on this tool.

This guide could show how can:

1) Get hbm.xml file and java classes from the database models (throught JDBC)
2) Generate Classes and Database model using hbm.xml file
3) Generate hbm.xml file and Database model using xDoclet using embebed information on Classes tags


I understand of course that this project is a group effort and not a comercial application...I am just only making a suggestion ,that I think other people like me, that can see the potential that this framework has but dont't know how to use it can agree...

Sorry about my poor English!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 2:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Welcome...

There is a wealth of information on the wesite about Hibernate usage. A good starting place is http://www.hibernate.org/hib_docs/examples/quickstart/html/quickstart.html After that try browsing the documentation and building up some more complex use cases building on the quick-start or examples package.

Personally, I don't use any of the generation tools. And especially for new users, I would think it would be of great value to start off with some very simple use-cases with hand-coded classes, manually-edited mapping files and manually-created database tables. That way you can see how all these pieces fit together and interact. And, perhaps even more importantly, you can directly see issues/errors that Hibernate will complain about and how to resolve them. Then add in the additional complexity that comes with another tool layer. To me its a walk, then run situation...

It might not seem like it now, but the mapping in Hibernate is fairly easy to understand and write after you play with it a little bit.. I also have used TopLink, and can say without a doubt that I could now map entities faster in Hibernate than in TopLink using its UI.

Anyway, HTH


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 3:03 pm 
Newbie

Joined: Mon Sep 08, 2003 1:45 pm
Posts: 3
Take for sure that I 'consumed' all that information that I could..I agree that sometimes its more easy editing by hand a text file that use gui tool...
In general I choose this aproach...

I also saw that the xml sintax is very simple to understand...the proble (for me) its that I am involucrated on the development of a project that uses a lot of tables (a hundred or more), with lots of fields on each one and with all of relations between them (FKs)...I think at first time use another free tool (Cayenene) that I have to admit has a good modeler tool but I also must say that I like more your framework core and its query languaje...

So, having a modeler / automatic code generation tool could saveme a lot of time and avoid me lots of 'code typing' errors...Yes I know that Middlegen can do this kind of work...But I have to be honest...I don't understad how can I begin! ...And I don't use to be thes lazy developer that post on jguru a question like "How can I make reservation system using java"...

Anyway...Thx for your information...you do a good job ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 3:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I am not saying don't use these tools, and I'm sorry if you think that's what I was trying to say. Instead I am trying to answer your question of where to begin. I was uncertain whether your question related specifically to middlegen or hibernate.

As for generation tool, there are also the hibernate round trip tools http://www.hibernate.org/102.html which may or may not be easier to grasp. Again, I have not used even these so I cannot say for sure, but thats another option.


Top
 Profile  
 
 Post subject: Its Ok...
PostPosted: Mon Sep 08, 2003 4:20 pm 
Newbie

Joined: Mon Sep 08, 2003 1:45 pm
Posts: 3
I am apologize...I understand your pint of view...securely with my limited english I didn't express myself in a clear way...My particular issue is related to the use of Middlegen plugin in order to read database tables and its relationships in order to get java classes files and hbm.xml files...

Be sure that I will be one of the first buyers of "Hibernate in action" when this book were published!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 7:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The release package (r1) on the Hibernate download site has everything that you need to start using Middlegen. I built it with the express purpose of simplifying entry requirements to start using the tool. All you will need to do is unzip, set the appropriate classpath and path for the JVM and Ant (which would need to be installed) and run ant.

The example uses hsqldb and an ant task is present to build the tables required by the example. The default generation mode is the present the GUI to allow you change the attributes and fine tune the output appropriately. Hope this helps.


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.