0
votes

On Parse I have a user, this user has an ID needed to start a messaging service with them called messageID. This messageID is contained in a separate class (Messaging) with class ACL set to public read and write = true, however the individual rows have their ACL's set to publicRead = false and publicWrite = false, so only the user it is pointing to can read or write to it.

My problem is that ever since having a pointer from the user to that private message field I get (what seems like) random 'Object not found for update' errors when I am creating a comment or a post in my app.

For more information the post that I am creating has a pointer called postOwner which points to the user that contains a pointer to the message class. I think because the second pointer is to a private field to everyone except the user I am getting the error. This however does not explain why a post works sometimes and doesn't work others.

2

2 Answers

0
votes

When you want to update any parse table value that a time ACL Permission is require.ACL Permission is Read Write permission. set ACL Permission before query save (get Call back) response. like...

ParseACL groupACL = new ParseACL();

groupACL.setReadAccess(user1, false);
groupACL.setWriteAccess(user1, true);  

groupACL.setReadAccess(user2, true);
groupACL.setWriteAccess(user2, false);  

gameObject.setACL(groupACL);
gameObject.saveInBackground();
0
votes

I finally figured out what was happening on this. My problem was that the object I was pointing to had publicRead and publicWrite set to false. What I had to do instead was query for that object in cloud code using the MasterKey. It's not ideal, but it solved the problem. Hope this helps