aspose file tools*
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
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: 208

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%
 
 
subject: Why hibernate allows entity name to be retrieved only for persistent entities