diff --git a/src/main/java/com/example/locavel/repository/PlaceRepository.java b/src/main/java/com/example/locavel/repository/PlaceRepository.java index 83cd0f3..fcc9c19 100644 --- a/src/main/java/com/example/locavel/repository/PlaceRepository.java +++ b/src/main/java/com/example/locavel/repository/PlaceRepository.java @@ -29,7 +29,7 @@ List findPlacesInRange( "(6371 * acos(cos(radians(:latitude)) * cos(radians(latitude)) * " + "cos(radians(longitude) - radians(:longitude)) + sin(radians(:latitude)) * " + "sin(radians(latitude)))) AS distance " + - "FROM Places " + + "FROM places " + "HAVING distance < :radius " + "ORDER BY distance", nativeQuery = true) List findNearbyPlaces(@Param("latitude")double latitude,