My database has several records and each record has object's location (2 fields: latitude and longitude). I need to calculate the distance from the current user's location to each object (with distanceBetween
method). Then this value should be written into another database field (distance).
How should I do that?