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

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -