nhachicha / SnappyDB

A key-value database for Android
1.78k stars 220 forks source link

com.snappydb.SnappydbException: Maybe you tried to retrieve an array using this method ? please use getObjectArray instead java.lang.IndexOutOfBoundsException: Invalid index 108, size is 2 Serialization trace: #98

Open abhilash007 opened 7 years ago

abhilash007 commented 7 years ago

When i add one more variable(mark) getting this error while calling getObject otherwise no isuue

 ArrayList<Student> documents = (ArrayList<Student>) snappyDB.getObject("test", ArrayList.class);
public class Student {
    private String name;
    private int age;   
    public Student() {
    }   
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
}

added new variable private int mark

public class Student {
    private String name;
    private int age;
    **private int mark**;
    public Student() {
    }
    public Student(String name, int age,int mark) {
        this.name = name;
        this.age = age;        
    }
}