*
The moose likes Object Relational Mapping and the fly likes Can anyone suggest me a good book on hibernate ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Can anyone suggest me a good book on hibernate ?" Watch "Can anyone suggest me a good book on hibernate ?" New topic
Author

Can anyone suggest me a good book on hibernate ?

Gayatri Ganesh
Ranch Hand

Joined: Dec 23, 2003
Posts: 143
Hi Everyone,

I am new to Hibernate. Was searching for a book for it.
Can anyone suggest me a good book on hibernate ?

Thanks,
Gayatri
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
I have Hibernate in Action and like it. The examples are clear, and it get's you started pretty quickly. What I feel is missing in both the Hibernate and Spring worlds is a book for the non-beginner that covers best practices for real-world difficult problems. But if you're just getting started with Hibernate, it's a great book.

It's written by Christian Bauer and Gavin King, the main developers of Hibernate.
William Siu
Greenhorn

Joined: Feb 15, 2005
Posts: 1
Hibernate in Action is a very good book. It touches on the rationale behind the design and application of Hibernate.

Hibernate - A Developer's Notebook from Oreilly is good for beginner. It is practical, hands-on with examples. What I like most is the structure of each topic. 1st - How do I do that? (What to do), 2nd - What just happened? (explain why), 3rd - What about (more explanation or extension).
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Welcome to JavaRanch, William!

Did you find that HaDN was still useful with HiA? Or did HiA cover most of the information in HaDN? I did note that HiA was a little short on setting up the environment.
Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

I haven't, myself, read HiA. HaDN was a very good resource, though, for getting my first medium-scale project up and running using Hibernate, so I can't more highly recommend it. (Then again, I've liked the series so far - very good for getting a running start on the technologies, and I own the Tiger, Hibernate and Mono books...)


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
HaDN was a very good resource, though, for getting my first medium-scale project up and running using Hibernate, so I can't more highly recommend it.


could you find in it how to map inheritance?


java amateur
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
HiA definitely covers all of the inheritence mapping options. For your specific case, check out this very similar thread.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'd like to echo the recommendation for "Hibernate in Action". I've got "Professional Hibernate" from WROX and I like HiA much better.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Gayatri Ganesh
Ranch Hand

Joined: Dec 23, 2003
Posts: 143
Thanks everyone. I got my copy of Hibernate in Action.
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
If you can, please reply to this thread after you have a good feel for the book and let us (and more importantly, the next person with this same question) know how well it satisfied your needs.
Gayatri Ganesh
Ranch Hand

Joined: Dec 23, 2003
Posts: 143
I have been reading Hibernate in Action.
Its a good book but I feel there are a few topics which I am unable to understand from it.
Associations in chapter 3 and cascade persistence of chapter 4 are two topics till now I am unable to clear my concepts on.
I looked at the documentation on hibernate.org but it wasn't of much help.
Can anyone guide me on these 2 topics ?

Thanks,
Gayatri
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Can you phrase specific questions on those topics? Those topics are pretty large, and I doubt I could summarize them better than the book in a timely manner. But some of us here might be able to answer your questions.
Sathya Srinivasan
Ranch Hand

Joined: Jan 29, 2002
Posts: 379
I used "Hibernate in Action" and the default documentation that comes with Hibernate (Hibernate Quick Reference) to learn Hibernate.

I have been using it extensively in the project now and feel that these books do the job.

If you have specific questions regarding using Hibernate, both this forum and the Hibernate Forum are very active and are full of large-hearted souls willing to share their experience!


Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Hi,
I also read Hibernate in Action.

thanks
daniel
Gayatri Ganesh
Ranch Hand

Joined: Dec 23, 2003
Posts: 143
Hi,

I am unable to understand the difference between persistence by reachablity and persistence by cascading.

If you look at page 110 of Hibernate in Action, the last 2 lines of the page say :
"The cascade attribute tells Hibernate to make any new Bid instance persistence (that is, save it in the database) if the Bid is referenced by a persistent Item."

Isn't this similar to Persistence by reachability ?

What I understand of Persistence by reachability (correct me if I am wrong ) is :

Whenever a transient object is referenced by another object which is persistent, then the transient object becomes persistent. But if persistent object becomes transient, it is removed from the db but can't be removed from memory because it maybe referenced by some other objects and Hibernate has no algorithm to find out objects which are not referenced by anyone to delete them from memory.

So what is the difference between the two ?
Can anyone please advise ?

Thanks,
-Gayatri
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Originally posted by Gayatri Ganesh:
I am unable to understand the difference between persistence by reachablity and persistence by cascading.
Look at the last paragraph of 4.3 on page 131.
There is more than one model for transitive persistence. The best known is persistence by reachability, which we'll discuss first. Although some basic principles are the same, Hibernate uses its own, more powerful model, as you'll see later.

[ My emphasis in bold ]
The next section (4.3.1) then describes the concept of persistence by reachability but concludes with this (last sentence on page 132):
Let's look at Hibernate's more flexible transitive persistence model.
The authors' self-contratulating aside, the point is that Hibernate doesn't use persistence by reachability. Instead it uses its own form of it called transitive persistence.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can anyone suggest me a good book on hibernate ?
 
Similar Threads
please suggest a book for Servlets
plz help
plz help
Book for Spring and Hibernate
suggest me