Package org.hibernate
Class EntityFilterException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.persistence.PersistenceException
jakarta.persistence.EntityNotFoundException
org.hibernate.EntityFilterException
- All Implemented Interfaces:
Serializable
Thrown if an enabled filter would filter out
the target of a
@ManyToOne
or
@OneToOne
association.
By default, a filter does not apply to to-one association fetching,
and this exception does not occur. However, if a filter is explicitly
declared applyToLoadByKey = true
,
then the filter is applied, and it's possible that a filtered entity
is the target of a to-one association belonging to an unfiltered entity.
Replacing such a filtered object with null
would lead to data
loss, and so filtering never results in such replacement. Instead,
this exception is thrown to indicate the inconsistency of the data
with the filter definition.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
EntityFilterException
-
-
Method Details
-
getEntityName
-
getIdentifier
-
getRole
-