Open ilxqx opened 1 week ago
Hi and thanks for reporting your experience. Indeed, a @MappingIgnore
annotation sounds like a useful thing to have. So the entity view implementation would still create a mutable field for this, but just ignore it for the purpose of forming the query.
First of all, thank you very much to the authors of the library for their great work. This project is truly remarkable!
The scenario is as follows: In an EntityView, besides the Getters for fields retrieved from the database, there might also be defined translation fields used to store values that are complexly transformed and translated based on certain fields in a view.
Here is a rough scenario:
Although it seems that using the constructor of an abstract class can solve this problem, I find that abstract classes have too many limitations and are extremely cumbersome to use. Interfaces are more convenient and also support multiple inheritances.
It would be great if we could add a
@MappingIgnore
annotation to ignore specific getters. I wonder if the maintainers of the library have any thoughts on adding this feature?