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
  • 77,657
  • 34
  • 181
  • 348
marherbi
  • 351
  • 4
  • 15

0 Answers0