Skip to content

Commit 6522191

Browse files
authored
Merge pull request eugenp#4534 from eugenp/jpa-fix
query type fix
2 parents 0242d74 + 83dc373 commit 6522191

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/PersonRepository.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface PersonRepository extends MyUtilityRepository<Person, Long> {
2020
Person findByName(@Param("name") String name);
2121

2222
@Query(value = "SELECT AVG(p.age) FROM person p", nativeQuery = true)
23-
Person getAverageAge();
23+
int getAverageAge();
2424

2525
@Procedure(name = "count_by_name")
2626
long getCountByName(@Param("name") String name);

0 commit comments

Comments
 (0)