Package org.hibernate

Class EntityFilterException

java.lang.Object
java.lang.Throwable
All Implemented Interfaces:
Serializable

public classEntityFilterExceptionextendsEntityNotFoundException
Thrown if an enabledfilter 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 declaredapplyToLoadByKey = 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 withnull 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 Details

    • EntityFilterException

      public EntityFilterException(String entityName,Object identifier,String role)
  • Method Details

    • getEntityName

      public String getEntityName()
    • getIdentifier

      public Object getIdentifier()
    • getRole

      public String getRole()