Hi all,
I'm particularly interested in the usecase when you want to have a DTO
projection from a native query. Currently as far as I know this is not
supported through the JPA API.
If I say entityManager.createNativeQuery("...", SomeDTO.class) Hibernate
says SomeDTO is not an entity, at least tha
That error might be the manifestation of the problem, but its just a
symptom of the fact that this is not supported. The type passed in to type
the query must match what is selected (your "...").
And in fact JPA and Hibernate *do* support this, just not the way you do
it. You have to use a Resul
Hey Steve,
Thanks for the answer.
I was aware of these two solutions but there are definitely projects which
want to use DTO projections and cannot (don't) want to utilize neither the
annotation nor the native Hibernate API.
I think using the approach I mentioned would be beneficial, at least I
On Fri, Aug 18, 2017 at 10:21 AM Arnold Gálovics
wrote:
> Hey Steve,
>
> Thanks for the answer.
>
> I was aware of these two solutions but there are definitely projects which
> want to use DTO projections and cannot (don't) want to utilize neither the
> annotation nor the native Hibernate API.
>
http://in.relation.to/2017/08/18/hibernate-orm-5110-final-release/
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev