Skip to content

object not found for update #597

Closed
Closed
@redblinkdevs

Description

@redblinkdevs

Hi ,
i am using parse server and mongo db on ubuntu 14.04 LTS
I have written some cloud script in which
i am getting user object from request and console.log(request.user) print below object
ParseUser { _objCount: 0, className: '_User', id: 'YK8c12J1xb' }

and in mango following row exists.

{ "_id" : "YK8c12J1xb", "address" : "chd", "name" : "Parm", "email" : "[email protected]", "username" : "parm", "_updated_at" : ISODate("2016-02-12T10:49:49.178Z"), "_created_at" : ISODate("2016-02-12T10:49:49.178Z"), "_hashed_password" : "$2a$10$hOMj/0s0AUf6Je/YIuCqU.FAkEoVu3j4IknKsMaYRcLG2LSGcoQV6", "emailVerified" : true }

then i have increment the count by 1 and save that but in error handler "object not found for update " was printing and user not updating .
like below
request.user.increment("publicTitleCount", 1);

request.user.save( {success: function(users) {
},error: function(user, err) {
console.error(err.message);
}});

similarly i have pass user object id to one function

userQuery = new Parse.Query("_User");
console.log(request.params.userObjectId);
userQuery.get(request.params.userObjectId, {

but in this case i am getting "Object not found"

This code is working fine on parse site and its live there.But giving problem on parse server.

Thanks ,
Parminder Ghuman

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions