Closed FULaBUla closed 7 months ago
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it. Right now, we struggle to understand what you want to achieve.
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it. Right now, we struggle to understand what you want to achieve.
According to the method I defined, the return value type I should get from Page.getContent()
is LinkedHashMap<String, Object>
. But actually, I get Object[]
from Page.getContent()
.
We do not support Map
as query method return type, see https://docs.spring.io/spring-data/data-jpa/reference/repositories/query-return-types-reference.html.
We do not support
Map
as query method return type, see https://docs.spring.io/spring-data/data-jpa/reference/repositories/query-return-types-reference.html.
@mp911de The documentation doesn't specify what type of T
is available in Page<T>
. And when I use Page<List<Object>>
, The type i get from Page.getContent()
is also Object[] instead of List
It does:
T
A unique entity.
A Map is not an entity.
It does:
T
A unique entity.A Map is not an entity.
I know, but when I use Page<List<Object>>
, The type i get from Page.getContent()
is also Object[] instead of List
And I remember that in the previous version, spring-data-jpa could use map, where the key value was the name of the column, and the value was the corresponding value of the column.
@mp911de
I wish spring-data-jpa return
Page<LinkedHashMap<String, Object>>
but you returnPage<Object[]>
. The content type isn'tLinkedHashMap<String, Object>
, it isObject[]
.