You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is expected that the Class Based Projections would work for native queries, as stated in the doc. Well, the doc does not mention specifically that Class Based Projections would work for native queries, but on the contrary it does not mention for what queries it would work, so the assumption is that for all @Query methods.
The text was updated successfully, but these errors were encountered:
You find the specifics at the end of the document:
And it’s important to point out that class-based projections do not work with native queries AT ALL. As a workaround you may use named queries with ResultSetMapping or the Hibernate-specific ResultListTransformer
Okay, thanks, found it, but nevertheless, I would expect this restriction under class based projection section, not under dynamic projection (to me seems to be far more decent), and honestly, it's not the first time we encounter this issue and according to Stack Overflow discussion, we're not alone.
mp911de
changed the title
Class Based Projection for JPA Native Queries
Reorder documentation of class-based projection support for JPA Native Queries
Aug 29, 2024
I've created a demo project to demonstrate the problem. It seems that only interface based projections are working fine, but if we want to use class based projections, we have the
ConverterNotFoundException
problem. Related Stack Overflow thread.It is expected that the Class Based Projections would work for native queries, as stated in the doc. Well, the doc does not mention specifically that Class Based Projections would work for native queries, but on the contrary it does not mention for what queries it would work, so the assumption is that for all
@Query
methods.The text was updated successfully, but these errors were encountered: