Support for querying against @MappedSuperclass #75
I've posted this on StackOverflow:
and you said to create a ticket here as this "is easily implemented" ;)
Basicly we'll need the @MappedSuperclass annotation to be treated as an @entity annotation when generating querytypes.
Summary of our setup:
We are working with single table inheritance for all entities in our application but don't need or want a discriminator column in the database as it would be redundant and cost a lot of space and performance. Hibernate's alternative instead of using
(which is already supported by queryDSL) is to use
so that no discriminator type is required to map the data from an extended entity back to its abstract parent object.
However: The Query DSL querytype generator does not generate an accessor for @MappedSuperclass.
should support a query like this:
with the query.list ultimately returning a List of Client objects than can then be mapped to ClientSimple objects.
This behaviour is neccessairy, because another application instance of the same base application might extend the Client in a different way (ClientAdvanced) but still has to use most of the same querying methods to find objects of the Client type but then cast them to ClientAdvanced.
The text was updated successfully, but these errors were encountered: