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
Post a Comment