0

Is there a way to get a simple List<String[] representing 2 columns from a Spring JPA Method inside a CrudRepository class?

Example:

@Transactional
public interface ProjectDao extends CrudRepository<Project, Integer> {

    @Transactional
    @Query("SELECT COL1, COL2 FROM TABLE1") 
    public List<String[]> get2Columns();
}
Jens Schauder
  • 70,783
  • 26
  • 162
  • 317
marherbi
  • 341
  • 4
  • 15

0 Answers0