I am trying to fetch a PlaceEntity
. I\'ve previously stored a bunch of GooglePlaceEntity
objects where
You should use the name of the class instead of the table name on the query. Change place to PlaceEntity.
@Query(value = "" +
"SELECT * " +
"FROM place JOIN google_place ON google_place.id = place.id " +
"WHERE earth_distance( " +
" ll_to_earth(place.latitude, place.longitude), " +
" ll_to_earth(:latitude, :longitude) " +
") < :radius",
nativeQuery = true)
List findNearby(@Param("latitude") Float latitude,
@Param("longitude") Float longitude,
@Param("radius") Integer radius);