Skip to content

request.user is not up-to-date #1836

@iForests

Description

@iForests

I have a simple Cloud Function:

Parse.Cloud.define('testQuery', function(request, response) {
    var user = request.user;
    response.success("user.get('data') = " + user.get('data'));
});

And a simple function call from Android SDK:

ParseCloud.callFunctionInBackground("testQuery", new HashMap<String, Object>(), new FunctionCallback<String>() {
    @Override
    public void done(String result, ParseException e) {
        if (e == null) {
            Log.d("testQuery", result);
        }
    }
});

Let's say the value "data" of my User object is "AAA". I call the function from Android SDK. Parse.com's server and self-hosted server both return user.get('data') = AAA.

Now I change the value of "data" to "BBB" from Dashboard, and call the function again. The results are different. Parse.com's server returns user.get('data') = BBB as expected, but the self-hosted server still returns user.get('data') = AAA.

Is it a correct behavior of the new Parse-Server or is it a bug? And if it's a correct behavior, how can I get the up-to-date data of request.user. Thanks.

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