parse-mockdb icon indicating copy to clipboard operation
parse-mockdb copied to clipboard

Parse.Save not working when working with extended classes

Open Roost opened this issue 5 years ago • 1 comments

I am seeing an issue where saving a custom class that extends Parse.Object results in the You need to call Parse.initialize before using Parse. error message when the _CoreManager tries to get the APPLICATION_ID.

class CoolClass extends Parse.Object {

    constructor(attributes) {

        // Pass the ClassName to the Parse.Object constructor
        super('CoolClass');

        // All other initialization
        this.coolness = 'awesome';
    }
}


let coolClass = new CoolClass();

coolClass.save() <<<<<<<<<<<<<<<<< Problem occurs here

The following code however works as expected.

let coolClass = new Parse.Object("CoolClass");
coolClass.save();

Am I missing something or custom classes not supported?

Roost avatar Mar 16 '20 13:03 Roost

I too had problems saving objects (v0.4.0) but reverting to an older version 'solved' it:

npm install [email protected] --save

coderofsalvation avatar Jun 08 '20 09:06 coderofsalvation