This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Why hibernate allows entity name to be retrieved only for persistent entities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Why hibernate allows entity name to be retrieved only for persistent entities" Watch "Why hibernate allows entity name to be retrieved only for persistent entities" New topic
Author

Why hibernate allows entity name to be retrieved only for persistent entities

Sagar Shroff
Ranch Hand

Joined: Jun 07, 2011
Posts: 207

Hello , have a query regarding SessionImpl.getEntityName(EntityObject) , why does hibernate allows to retrieve entity name only for persistent entities and why not for transient
entities ? when i try to invoke getEntityName(object) before invoking persist() it throws TransientObjectException. Any logical reason for doing this ?

Regards,
Shroff.


OCJP-90%,OCPWCD-95%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why hibernate allows entity name to be retrieved only for persistent entities
 
Similar Threads
Why we need to persistent unit in EJB 3.0 ?
Hibernate load vs get, confused on Hibernate Proxies too
Question on find() and getReference()
"Persisting" an entity bean in memory (via BMP)
Difference between detached entity and new entity JPA