• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A good book for learning Hibernate framework

 
Aditi Khalatkar
Greenhorn
Posts: 5
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for a very basic book on Hibernate, something like Head First Java is for Java beginners. I have absolutely no experience over Hibernate or Spring frameworks,though I do know the basics of Core Java. So, kindly suggest an appropriate book. Any website will also do good.
 
Rob Spoor
Sheriff
Pie
Posts: 20745
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read Pro JPA2 in preparation of my JPA exam. Although it's not about Hibernate specifically, JPA is broader; Hibernate is only one possible implementation.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aditi Khalatkar,

First of all, a warm welcome to CodeRanch!

Aditi Khalatkar wrote:I am looking for a very basic book on Hibernate, something like Head First Java is for Java beginners.

None of my suggestions are actually books, but I think they are still good resources.

I really like the Java Persistence API WikiBook. When I'm having an issue with JPA, JPQL, or something related it's the first resource I'll check to find a solution. It's really an excellent resource (in my humble opinion)! It's not a step-by-step tutorial, but you'll find everything required in this wiki book: from basic entity mappings to complex JPQL queries.

If you are looking for a step-by-step tutorial, I would definitely have a look at the Hibernate Getting Started Guide.

Finally in this topic the same question was asked, so it might be wirth reading this topic as well.

Hope it helps!
Kind regards,
Roel
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably one of the best books four learning would be Manning Press, Hibernate in Action, although I don't know how up to date it is.

Hibernate is one of the oldest of the ORM systems and the original Hibernate syntax and support files were not the same as JPA syntax and support. However, Hibernate was one of the major contributors to the JPA standard, so the principles are very similar, even though the syntax varies. Also, Hibernate predated Java annotations, so the oldest Hibernate stuff used XML files to spec out the entities and stuff. XML is still an option, but it's no longer the only option.

I recommend JPA over straight (traditional) Hibernate. JPA is actually part of the official EJB Version 3 ORM spec, though it can operate independently of EJB. I once migrated a project from Apache OpenJPA to Hibernate JPA in about 20 minutes when I had to work around an OpenJPA problem. Traditional Hibernate is doesn't offer flexibility like that.

I have an ancient copy of Hibernate In Action sitting right next to my Pro JPA 2 book. I will admit that I use the Pro JPA 2 book more, but then, it's been a long time since I learned ORMs. I started out on Kodo, which was also similar but not compatible, moved to Hibernate, then moved to JPA.
 
Aditi Khalatkar
Greenhorn
Posts: 5
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you people for your suggestions. I guess I'll start off with Hibernate Getting Started Guide for the time being. Later on, if I plan to study JPA, then I'll go for the other resources.

Roel De Nijs wrote:Finally in this topic the same question was asked, so it might be wirth reading this topic as well.

Thanks for the link. Some more resources are listed there.

Tim Holloway wrote:Hibernate is one of the oldest of the ORM systems and the original Hibernate syntax and support files were not the same as JPA syntax and support. However, Hibernate was one of the major contributors to the JPA standard, so the principles are very similar, even though the syntax varies. Also, Hibernate predated Java annotations, so the oldest Hibernate stuff used XML files to spec out the entities and stuff. XML is still an option, but it's no longer the only option.

Thanks for the brief overview about Hibernate. Its always better to know a little bit of history.
 
Chris Barrett
Bartender
Posts: 317
24
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Probably one of the best books four learning would be Manning Press, Hibernate in Action, although I don't know how up to date it is.

It was replaced by Java Persistence with Hibernate, 2nd Edition. Same authors (Christian Bauer and Gavin King), plus now Gary Gregory has joined them. It's up to date (Hibernate 5.x & JPA 2.1) and their (free) website is also chocked full of examples: http://jpwh.org
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic