FAQ Database Discussion Community


Create a PFObject and PFRelation after PFUser Sign Up

ios,swift,parse.com,pfuser,pfrelation
In my structure, I would like to signUp a User and assign a Group to it directly (Many to many relationship model) Below is how I signUp the user. after completion, I have no idea how to relate to the PFObject using PFRelation. Any thoughts please? // SIGN UP USER...

Start query from relation

ios,parse.com,relation,pfquery,pfrelation
I have a class named Circle with a relation named "members" to the _User class. Class Circle: Class _User: I'm trying to query all Circles that the current user belongs to (inside the "members" relations). PFUser *user = [PFUser currentUser]; PFRelation *relation = [user relationForKey:@"members"]; PFQuery *query = [relation query];...

How to convert PFObject to PFRelation

ios,swift,parse.com,pfobject,pfrelation
Here is my code in Swift @IBAction func addUser(sender: AnyObject) { var query = PFUser.query() query.whereKey("username", equalTo: usernameTextField) query.getFirstObjectInBackgroundWithBlock{ (objects:PFObject!, error: NSError!) -> Void in if error == nil { var friendList = PFUser.currentUser().relationForKey("friends") // I don't understand relationforKey, what does it do? and what happen inside ( )? var...

Why PFRelation does not support fromLocalDataStore queries?

ios,parse.com,pfrelation
I have a PFUser object with several PFRelation pointing to other objects. When I run the following code: PFRelation *relation = [[PFUser currentUser] relationForKey:@"Relation"]; PFQuery *query = [relation query]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){ NSLog(@"%@", objects); }]; it works fine. However, when I want to do the same from the...

Parse iOS PFRelation within PFObjects with Pointer

ios,parse.com,pfrelation
Im trying to finish one iOS app using Parse but Im stucked in the most two important features that should be used in the app. Scenario: I have two main classes, one User and other Channel. Users create objects in Channel class by creating channels, so in Channel there is...