Skip to content

Subclassing Parse.User #335

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

Closed
futureinapps opened this issue Aug 22, 2016 · 3 comments
Closed

Subclassing Parse.User #335

futureinapps opened this issue Aug 22, 2016 · 3 comments

Comments

@futureinapps
Copy link

import Parse from 'parse';
class CustomUser extends Parse.Object{
static name(){
return 'haha';
}
constructor(){
super('_User');
this.hahah = 'sadad';
}
}
export default CustomUser;

and i have registerSubclass in index file.

Other classes a normaly subclassing, but user not

when i do query:

let newUser = new CustomUser();
let query = new Parse.Query(newUser)

and in callback i have _User object without hahah

@tsvetann
Copy link

Did you try to extend the Parse.User object directly?

Parse.User.allowCustomUserClass(true);
class UserModel extends Parse.User.....

@stale
Copy link

stale bot commented Feb 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 6, 2019
@stale stale bot closed this as completed Feb 13, 2019
@RaschidJFR
Copy link
Contributor

I think this is related to parse-community/parse-server#5521

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

No branches or pull requests

4 participants