IncorrectResultSizeDataAccessExce
全部标签 我想在spring-data中使用sqlselectbymethodname。选择应按价格排序。@EntitypublicclassProduct{intname;BigDecimalprice;}interfaceProductRepositoryextendsCrudRepository{ProductfindFirstByNameOrderByPriceAsc(Stringname);}结果:org.springframework.dao.IncorrectResultSizeDataAccessException:resultreturnsmorethanoneelements
我想在spring-data中使用sqlselectbymethodname。选择应按价格排序。@EntitypublicclassProduct{intname;BigDecimalprice;}interfaceProductRepositoryextendsCrudRepository{ProductfindFirstByNameOrderByPriceAsc(Stringname);}结果:org.springframework.dao.IncorrectResultSizeDataAccessException:resultreturnsmorethanoneelements