Package org.hibernate
Class PropertyValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.persistence.PersistenceException
org.hibernate.HibernateException
org.hibernate.PropertyValueException
- All Implemented Interfaces:
Serializable
Thrown when the (illegal) value of a property can not be persisted.
There are two main causes:
- a property declared
@Basic(optional=false)
is null, or - an association references an unsaved transient instance.
- See Also:
-
Constructor Summary
ConstructorDescriptionPropertyValueException
(String message, String entityName, String propertyName) Constructs aPropertyValueException
using the specified information. -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PropertyValueException
Constructs aPropertyValueException
using the specified information.- Parameters:
message
- A message explaining the exception conditionentityName
- The name of the entity, containing the propertypropertyName
- The name of the property being accessed.
-
-
Method Details
-
getEntityName
-
getPropertyName
-
getMessage
- Overrides:
getMessage
in classThrowable
-