Package org.hibernate
Class TransientPropertyValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.persistence.PersistenceException
org.hibernate.HibernateException
org.hibernate.TransientObjectException
org.hibernate.TransientPropertyValueException
- All Implemented Interfaces:
Serializable
Thrown when the state of an entity cannot be made persistent
because the entity 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 Summary
ConstructorsConstructorDescriptionTransientPropertyValueException
(String message, String transientEntityName, String propertyOwnerEntityName, String propertyName) Constructs aTransientPropertyValueException
instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the property name.Returns the entity name for entity that owns the association property.Returns the entity name for the transient entity.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TransientPropertyValueException
public TransientPropertyValueException(String message, String transientEntityName, String propertyOwnerEntityName, String propertyName) Constructs aTransientPropertyValueException
instance.- Parameters:
message
- - the exception message;transientEntityName
- - the entity name for the transient entitypropertyOwnerEntityName
- - the entity name for entity that owns the association property.propertyName
- - the property name
-
-
Method Details
-
getTransientEntityName
Returns the entity name for the transient entity.- Returns:
- the entity name for the transient entity.
-
getPropertyOwnerEntityName
Returns the entity name for entity that owns the association property.- Returns:
- the entity name for entity that owns the association property
-
getPropertyName
Returns the property name.- Returns:
- the property name.
-
getMessage
- Overrides:
getMessage
in classThrowable
-