|
A hibernate filter defined on a @MappedSuperclass causes SQLGrammarException if SELECT statement is executed from Entity which indirectly inherits from the @MappedSuperclass.
For example, given the following classes:
@MappedSuperclass class ABase {}
@Entity class A extends ABase {}
@Entity class B extends A {}
the following JPQL query
fails with the following exception:
According to https://hibernate.atlassian.net/browse/HHH-4332 and https://hibernate.atlassian.net/browse/HHH-123 the filter inheritance should work from version 3.x.
Indeed this has worked in the version 4.1.5.Final. But from the version 4.1.6.Final it has stopped working. The same error also occurs in the latest release (4.3.1.Final).
Propbably the issue https://hibernate.atlassian.net/browse/HHH-8033 is releated to this.
The attached test case is a Maven project containing tests for the example above.
|