1

In Hibenate, for an object there can be 3 states -

transient, persistent, detached.

But can a object state change from detached to transient and how is that possible?

Chaitanya
  • 15,403
  • 35
  • 96
  • 137

1 Answers1

1

No, it's not possible.

Transient object are objects with no reference in database. Persistent and detached on the other hand have representation in database (are persisted). Detached object is persisted, but for this object hibernate session is closed. You may move this object back to persistence state, but there is no way to change from detached to transient.

Wirus
  • 1,140
  • 10
  • 10