Well, I simply couldn't agree with you more!
I've worked on
alot of Hibernate projects, or come into Hibernate projects and they were just a mess. The reason was simple - people were getting Hibernate to do something they wanted it to do, without any real understanding of how to use Hibernate properly. As such, people were calling update when it wasn't needed, doing refreshes for no apparent reason, eagerly loading when it wasn't necessary, and opening sessions and committing transactions way too often.
One of the biggest problems with Hibernate projects is that people don't really understand how Hibernate works. That's really the big thing that my book does - it helps people understand how Hibernate works, and what Hibernate does between opening a session and closing a session. With that type of a strong foundation, people begin to understand when they need to load eagerly, or when they need to open or close a session.
So, one of my goals with the book is not to merely get people up and running with Hibernate, but to also show them how to use the technology properly. As such, best practices naturally make their way into persistence project, people make good decisions about fetch types and loading strategies, there are fewer problems during the development cycle, and when problems do arise, they can be solved quickly by competent and knowledgeable Hibernate developers.
Kindest regards,
-Cameron McKenzie