java - ClassCastException when subclassing ParseUser (Parse.com) -


i have custom fields in _user class on parse , subclass in order implement convenience methods such getname(), getsurname() , on... have no problems when subclassing parseobjects, parseuser classcastexception when obtaining current user. here have done:

@parseclassname("_user") public class parsestudent extends parseuser { ... } 

then subscribed new class in application class

parseobject.registersubclass(parsestudent.class); 

when try access current user instance of subclass in way

parsestudent user = (parsestudent) parseuser.getcurrentuser(); 

i exception. ideas on wrong?

the problem in custom subclass subscribing, performed after parse initialization. must done before it, stated in docs.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -