Package org.hibernate

Class TransientObjectException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TransientPropertyValueException

public class TransientObjectException extends HibernateException
Thrown if a transient instance of an entity class is passed to a Session method that expects a persistent instance, or if the state of an entity instance cannot be made persistent because the instance holds a reference to a transient entity.

An entity is considered transient if it is:

  • a newly-instantiated instance of an entity class which has never been made persistent in the database, or
  • an entity instance previously associated with a persistence context which has been removed from the database.
See Also:
  • Constructor Details

    • TransientObjectException

      public TransientObjectException(String message)
      Constructs a TransientObjectException using the supplied message.
      Parameters:
      message - The message explaining the exception condition