parse.com - Parse Android SDK, saveAll subclass objects? -


i'm using parse sdk on android. there doesn't seem documentation on using parseobject.saveall(list<parseobject>) method. have subclass called test extends parseobject. i've been able use parseobject methods far, save whole list using saveall method, requires list<parseobject> , won't accept list<test>. ideas?

your parseobject model may this

class person extends parseobject {     public static string name = “name”;     public static int age = “age”;     public void setname(string name)     {         put(name,name);     }     public void setage(int age)     {         put(age,age);     }     public stirng getname()     {         return get(name);     }     public int getage()     {         return get(age);     } } 

now,person subclass of parseobject. can use parseobject.saveall(list personlist)

person person1 = new person(); person1.setname("mike"); person1.setage(18); person person2 = new person(); person2.setname("john"); person2.setage(25); list<person> personlist = new arraylist<person>(); personlist.add(person1); personlist.add(person2); parseobject.saveall(personlist); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -