• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Sagar Shroff
Ranch Hand
Posts: 209
Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?

Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!