karimkhan pathan wrote:hi,
can you please answer the following question .
I know hibernate will have a versioning ,if versioning is not available then
How does Hibernate distinguish between transient and detached objects?
Between/ Not sure what you mean. But any object not managed by Hibernate is detached, whether it was loaded before by Hibernate, created with the new keyword, or retreived outside Hibernate. a Transient object is one without an id set. When a transient object is attached to Hibernate Session, and has no ID, when saved Hibernate will do an insert.
Basically, versioning is unrelated to detached/transient objects.
Mark