I have had this code working before but I didn’t try it for the past 2-3 months and now I am visiting it again and it is not working. Perhaps a new issue?
Basically, I have a complex query that returns details from Videos table along with all the related columns in addition to count on one column. So for example, I want all the videos returned where its location is around me and in that return results I was the video details, the related column (such as posted by, location) and a count on a Likes column to see how many people liked the video
Here is the query
String query = new String("");
query+= String.format(“distance(%f, %f, location.latitude, location.longitude ) < km(%f)” , lat, lng, distance);
queryBuilder.setProperties(“file”, “caption”, “videoLength”, “created”);
queryBuilder.addProperty(“Count(likedBy) as likes”);
queryBuilder.setGroupBy( “objectId” );
queryBuilder.setRelated(“postedBy”, “location”, “title”);
List resultsWithLikesCounts = Backendless.Data.of( “Videos” ).find( queryBuilder );
The query is returning the correct entries with all the columns. However the related columns (such as postedBy, Location) are null. I explecitly set the relation in the queries. Please advise as this is a core part of the app and repeated through out.