Questions tagged [pfrelation]

A class that is used to access all of the children of a many-to-many relationship as it pertains to a specific PFObject. Each instance of PFRelation is associated with a particular parent object and key.

More information available here.

64 questions
0
votes
1 answer

Perform action when all responses are retrieved from Parse

I have two models, subclassing from PFObject: ** a Recipe model class Recipe: PFObject, PFSubclassing{ class func parseClassName() -> String { return "Recipe" } @NSManaged var name: String? var toIngredients: PFRelation! { return…
Laura Calinoiu
  • 704
  • 1
  • 8
  • 24
0
votes
0 answers

Can't add PFObject to PFRelation on PFUser

I know this question has been asked around quite a bit, but none of the solutions are fitting my scenario. I am trying to add an object to a relation for the current user. Note that I have no issues adding object to relation unless the object that…
ITGronk
  • 621
  • 1
  • 6
  • 13
0
votes
0 answers

How to query current, friends list and add it to ListView in android with parse

I've saved current user's friend list with PFRelation in android with parse and I want to query the current user's friend list to show it in listView (Or ListAdapter, I don't know which one is better) Can you guys show me how to do it? source code…
John DOE
  • 25
  • 1
  • 7
0
votes
1 answer

Can i save PFRelation with method pinInBackground?

I try save relation this way [pfBill pinInBackgroundWithBlock:^(BOOL succeeded, NSError *PF_NULLABLE_S error) { [relation addObject:pfBill]; [pfObjectWithRelations pinInBackgroundWithBlock:^(BOOL succeeded, NSError *PF_NULLABLE_S…
0
votes
1 answer

Adding object to PFRelation through Cloud Code

I am trying to add an object to a PFRelation in Cloud Code. I'm not too comfortable with JS but after a few hours, I've thrown in the towel. var relation = user.relation("habits"); relation.add(newHabit); …
apolo
  • 441
  • 4
  • 18
0
votes
1 answer

Can't access attributes of a PFRelation

I'm trying to get the name of a Client that is owner of a Vitrine. Here is my code. To save the data I'm doing this: self.vitrine["username"] = PFUser.currentUser()?.username self.vitrine["name"] = nameTextField.text as String var relation…
0
votes
1 answer

Check if PFObject is in PFRelation

I am building an iOS in Swift using Parse.com as my backend. I have a table of objects: car, and each car can be owned by multiple users, so I have a Car table with the column owners which is a PRRelation of the _User table. I am displaying all the…
Max
  • 1,974
  • 2
  • 16
  • 24
0
votes
0 answers

How to add a PFRelation between 2 PFUsers?

I want to have a relation between user A and user B ? Do you have an full working example for this ? Thanks very much :)
0
votes
1 answer

PFQuery returning objects where object's relation matches all conditions

Working on an iPhone app with Parse DB backend I'm trying to implement a search functionality using search tokens. I read Parse's white papers on scalable search, relations vs. pointers, documentation, various SO / Parse.com discussions, etc. -…
David Jirman
  • 1,216
  • 12
  • 25
0
votes
1 answer

How to perform Parse query using relation where relation contains one or no objects matching conditions?

I'm using the Parse iOS SDK in Objective-C and trying to query for objects based on whether an object's relation contains either at least one object matching a particular query or has no relational objects matching that same query. I'm trying to use…
Ken M. Haggerty
  • 24,902
  • 5
  • 28
  • 37
0
votes
1 answer

How to convert PFObject to 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!) ->…
sin90
  • 171
  • 1
  • 12
0
votes
1 answer

Start query from relation

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…
Miguel Ribeiro
  • 8,057
  • 20
  • 51
  • 74
0
votes
1 answer

iPhone - PFRelation Is Not Saving Object

I am new to parse and am trying to create a PFRelation that links a user to his/her pictures. Here is my code: NSData *imageData = UIImagePNGRepresentation(myImage); PFFile *imageFile = [PFFile fileWithName:@"image.png" data:imageData]; PFObject…
user2779450
  • 733
  • 1
  • 9
  • 19
0
votes
1 answer

Parse.com Get User Who Like an Object

So I've set up my relations correctly in Parse using the following code: var user = PFUser.currentUser() var relation = user.relationForKey("likes") relation.addObject(self.post) user.saveInBackgroundWithBlock({ (Bool, error) -> Void in …
ExoticChimp
  • 1,884
  • 1
  • 19
  • 37
0
votes
1 answer

Get data from multiple table in single query using Parse

I am using Parse cloud as a backend in my app. Following are the tables in Parse, - Users objectId name 1 John 2 Mick 3 Nirav - UserConnection objectId senderObjectId receiverObjectId connectionType …
Nirav Dangi
  • 3,607
  • 4
  • 49
  • 60