I'm trying to update an existing row in my Parse.com class from an iOS app. Upon doing so, I'm getting this error back from Parse:
This user is not allowed to perform the update operation on City. You can change this setting in the Data Browser. (Code: 119, Version: 1.9.1)
I have two Parse.com classes: City and Bar. The City class is read-only (it's a list of cities that won't change) and the Bar class is the class that users interact with (like adding comments, ratings, menu items, etc). Bar has a Pointer column on City and the permissions on Bar are all on for the public user.
Here's a snippet of code:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
PFQuery *query = [PFQuery queryWithClassName:@"Bar"];
self.bar = [query getObjectWithId:self.barId];
self.bar.name = @"Foo";
[self.bar saveInBackground];
}
Some notes about the snippet: I'm passing in the bar's ID from the previous view controller via segue. I also know this is running the Parse query on the main thread and it's going to block...I'm simply prototyping right now and this is meaningless code.
Upon running that snippet, I get the error listed above. As you can see in the code, I'm not changing the city value nor am I even including it in the query results. I don't understand why I would be getting this error. Any input would be greatly appreciated!
Cityobject usingobjectWithoutDataWithClassName. It seems that instantiating an object in this manner sets the dirty flag as true. So when I save myBarit's also trying to save myCitybecause it's dirty. ButCityis read-only and hence the error.