I am using JPA with Spring Boot annotations.
I have a case where I want to do a query against a table that includes two additional computed columns that are not declared in the Entity class for that table. I thought I could do this by extending the Entity class and adding the two properties to the subclass. It compiles, but at runtime it complains that the subclass is an Unknown Entity. Adding the @Entity annotation to the subclass doesn’t solve the problem.
This is not a Projection, in the sense that I still want all of the original fields of the Entity plus some new ones, rather than a subset of the original fields. I’m hoping there’s a simple way to do this without having to create a new Repository.
Thanks,
Frank