• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New bie in Hibernate

 
Jyothsna Panchagnula
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I m new to Hibernate and wanted to lear about Hibernate.
I have installed HSQL DB and I didnt know which on to install form hibernate.org.
Can any one tell me how to setup the environment for Hibernate.
Also which type to pick from hibernate.org?


thanks
Jyothsna
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you've come to the right place. We can show you loads of Hibernate tutorials!

I've put together a few tutorials on my site that deal with setting up Hibernate and getting things configured to write a very simple Hibernate program. Here's the link:

Getting Started with Hibernate

I'm not too knowledgeable about HSQLDB, but as long as you know how to create a database/schema in it, and you have the database driver, Hibernate will connect to it. I always prefer working with Sun's MySQL, but that's just personal preference.

hibernate.org is where you can download 'Hibernate.' You'll want the Hibernate Core and I'd recommend Hibernate Annotations as well. With the Hibernate Annotations download, you'll have access to the JPA annotations in your code, which saved you from messing around with mapping files. The annotations at least give you some degree of design-time checking.

So, download some good stuff from Hibernate.org, gain some control of your database, and get hibernating!

-Cameron McKenzie
 
Jyothsna Panchagnula
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron,

Thank you for sharing the link.
Its helpful indeed.


regards,
Jyothsna
 
Jyothsna Panchagnula
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron,

I too have sun's Mysql in my laptop.


thanks,
Jyothsna
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate, or any technology, can be tough when you first start working with it. Struggle a bit, but don't waste too much time if you hit a snag. Just post back with a new question if you hit a snag.

Have fun!

-Cameron McKenzie
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With MySQL, all you need to do is create a schema in the MySQL database.

With the schema set up, you can code a Java class, drop a few simple annotations on the class, and then invoke two or three lines of code in a main method, and Hibernate will connect to the schema you set up and create the database tables for you. It's pretty sweet.

The following code not only defines a Java class, but includes a main method that will create the database tables in MySQL to store data about the object. It's all neat stuff.



Validating a Hibernate Installation and Creating Tables with SchemExport


-Cameron McKenzie
 
Jyothsna Panchagnula
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron,

Done with the installation according to the steps mentioned in your site.
Going to start t write sample code using Hibernate.

Will start using the sample code and post the questions if I am stuck up.

Thank you for the help and the sample code!!!


regards,
Jyothsna
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't be afraid to start a new thread for a new question!

Make sure your hibernate.cfg.xml file is in the right spot!

Good luck.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic