So, I’ve got the usual users table with a column called friends which is a one to many relations, it relates to other users in the users table. I was wondering how I would go about retrieving the friends and then their individual properties such as username, name and email etc.
I’m working with swift here, the project files you gave me are Objective-C and I’ve gone through the documentation a few times prior and was hoping for a more personal guide. I’m new to database services and Swift itself, and since I’m 14, the documentation is somewhat difficult to understand due to me being new to this and young.
Okay, well I’ll go into detail in order to make it clearer for you as to what I want to accomplish. Basically I want to create a contacts page, and this will require getting all the users related to the current user, I then want to be able to display all the friends as a table and be able to click on the user and get all of their individual details. The problem is that when I do:
user.getProperty(“friends”)
It returns all the friends in an Array and I don’t know how to reference the individual friends and return their details. I suppose I should be doing a dataQuery with a whereClause? Help is well appreciated, or if you want to talk more personally that’s cool too.
When you say “It returns all the friends in an Array and I don’t know how to reference the individual friends”. Do you mean you do not know how to iterate over the array and use the individual objects in it?