Filter to attributes by abstract class not working
See original GitHub issueDescription
I create a abstract class to convert a attribute status to a ENUM in the constructor and try to apply a equals filter, but I got a The attribute with the name 'status' couldn't be found on the view type 'AtendimentoView'"
Exception.
Expected behavior
A filter applyed in the attribute status
Actual behavior
I got Exception that there is not the status attribute, but the json prove that has the attribute:
[
{
"dataHoraAlteracao": "Mon, 31 Aug 2020 20:52:07 GMT",
"status": "Em execução",
"id": 548075,
"area": "GETIN",
"classificacao": "ATENDIMENTO WEB",
}
]
Steps to reproduce
Environment
Version: 1.5.0-Alpha5 JPA-Provider: Hibernate 3.2.1.ga DBMS: MSSQL Application Server: Java SE
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Filter condition using attributes defined in base class
I am using Hibernate 4.1 and had the same problem. This explains how to tell Hibernate which entity class your condition is actually...
Read more >Class Abstraction - Manual
In an Abstract Class, you can define how some methods work, where as in an Object Interface you can not. An Object Interface...
Read more >Abstract Classes in Python
An abstract method is a method that has a declaration but does not have an implementation. While we are designing large functional units...
Read more >Effective Dart: Design
Dart is a “pure” object-oriented language in that all objects are instances of classes. But Dart does not require all code to be...
Read more >ActionFilterAttribute Class (Microsoft.AspNetCore.Mvc.Filters)
An abstract filter that asynchronously surrounds execution of the action and the action result.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you want to use final fields, you can use self-injection: https://persistence.blazebit.com/documentation/1.5/entity-view/manual/en_US/#using-attribute-getters-in-constructor
Hmm, I’m not sure I understand the problem. There are many ways how you can make this work. For example you could use the following: