ActiveAndroid error Failed to Read Row 0, Column -1 from a CursorWindow?

195 views Asked by At

I am trying to query the database to get all Tree objects however an error is thrown: Failed to read row 0, column -1 from a CursorWindow which has 1021 rows, 15 columns.

Model:

@Table(name = "TreeDetails")
public class Tree extends Model {

    public Tree(){
        //Mandatory Empty Constructor
        super();
    }

    @Column(name = "ScientificName")
    public String scientificName;
    public String getScientificName() {
        return scientificName;
    }

    public static List<Tree> getAll(){
        return new Select()
                .from(Tree.class)
                .orderBy("ScientificName Asc")
                .execute();
    }
}

In Fragment:

public void getTrees(){
        Log.e(TAG, "get trees");

        List<Tree> trees = Tree.getAll();
    }

Why am I getting this error. There are 15 columns in the db but I only need 1. The spelling of he column is ScientificName.

0

There are 0 answers