aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate object states  and lifecycle? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate object states  and lifecycle? " Watch "Hibernate object states  and lifecycle? " New topic
Author

Hibernate object states and lifecycle?

arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3223
Many new hibernate users get confused bewteen hibernate object states (persistent, detached, transient) and life cycles. Also do you cover any aspects of domain driven design in your book?


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

I've made some of the unedited content from my book available on my website. One of the most popular links is about "How Hibernate Works", and I think it does a pretty good job at explaining how Hibernate manages the lifecyle of persistent objects. Forward this link to your team and have them read it. It should help make sense of things:

How Hibernate Works: Hibernate and the POJO Lifecycle States

-Cameron McKenzie
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1773
    
    7

Isn't the whole state-ori´┐Żnted approach part of the EJB 3.0 persistence specification? I mean, don't these "Hibernate object states" apply to JPA providers in general rather than Hibernate in particular?


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

I think that what we have seen over the past few years is a merging of the minds with regards to data persistence and Java applications. So, yes, I'd say that many of these concepts cut across most of the dominant persistence mechanisms that are being promoted today.

-Cameron McKenzie
 
Don't get me started about those stupid light bulbs.
 
subject: Hibernate object states and lifecycle?