Generated Entity View metamodel classes for views with attribute filters on primitive types can't be compiled #1826
Labels
component: entity-view-annotation-processor
kind: bug
workaround available
worth: medium
Implementing this has a medium worth
Milestone
Description
Entity View processor generates static metamodels that can't be compiled if an entity view declares default attribute filters for attributes with primitive types.
Entity view with an attribute filter:
Expected behavior
Generated classes for an entity view with a default attribute filter for a primitive attribute can be compiled.
Actual behavior
Generated classes attempt to use a primitive type in the parametrized
AttributeFilterMapping
.Actually generated metamodel:
Changing the attribute type to a wrapper or declaring a custom filter with a wrapper type resolves the issue.
Steps to reproduce
Declare an entity view with an attribute of a primitive type and add one of the default attribute filters(like
EqualFilter
orGreaterThanFilter
) via@AttributeFilter
. Then try to generate metamodel classes.See https://github.com/Seregy/blaze-entity-view-metamodel-primitive for an example in the project.
Environment
Version: 1.6.10 / 1.6.7
JPA-Provider: Hibernate 5.6.15.Final
DBMS: -
Application Server: Java SE
The text was updated successfully, but these errors were encountered: