0
I have an object that is persisted with jparepository
, I use paging but it returns all fields which is not necessary for the application. So there is some way to configure a @Query
to just pick up some data?
@Query(value = "SELECT p.id FROM produto p",
countQuery = "SELECT p.id FROM produto p",
nativeQuery = true)
@Override
Page<Produto> findAll(Pageable pageable);
The above example is not working. I just wanted to pick up the ID
and other fields however is not allowing this operation.