adspace


Explain the mechanism by which you can distinguish between transient (i.e. Newly instantiated) and detached objects in hibernate?

Answer Posted / Urvashi

Transient objects are newly created instances that have not been associated with a session, while detached objects were previously managed by a Hibernate session but have since been evicted or closed. To distinguish between them, you can check if the object's persistent property (i.e., isPersistent() method) returns false for transient objects and true for detached ones.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is latest hibernate version?

493