parse-mockdb
parse-mockdb copied to clipboard
Parse.Save not working when working with extended classes
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?
I too had problems saving objects (v0.4.0) but reverting to an older version 'solved' it:
npm install [email protected] --save