Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse.Save not working when working with extended classes #88

Open
Roost opened this issue Mar 16, 2020 · 1 comment
Open

Parse.Save not working when working with extended classes #88

Roost opened this issue Mar 16, 2020 · 1 comment

Comments

@Roost
Copy link
Contributor

Roost commented Mar 16, 2020

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?

@coderofsalvation
Copy link

coderofsalvation commented Jun 8, 2020

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

npm install parse-mockdb@0.2.5 --save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants