Trouble retrieving Strings from document made of nothing but String-String data pairs

I’m making a note-taking app in Android and with this, I have a POJO class “Task” with members: ‘task’ (String), ‘dateCreated’ (Date), ‘dateStart’ (Date), ‘isDone’ (boolean) and ‘isInProgress’ (boolean). I thought, to avoid troubles with how they are stored in the database, I figured to just store them all as strings, so in my UserDBManager class, I have this snippet in a method named ‘create()’:

MutableDocument doc = new MutableDocument();
Log.v(“mUserDBManager.create”, "task inserted: " + newTask.getTask());
Log.v(“mUserDBManager.create”, "date created inserted: " + newTask.getDateCreated());
Log.v(“mUserDBManager.create”, "date start inserted: " + newTask.getDateStart());

    doc.setString("task", newTask.getTask());
    doc.setString("dateCreated", String.valueOf(newTask.getDateCreated()));
    doc.setString("dateStart", String.valueOf(newTask.getDateStart()));
    doc.setString("isDone", String.valueOf(newTask.getIsDone()));
    doc.setString("isInProgress", String.valueOf(newTask.getIsInProgress()));

    try {;
    } catch (CouchbaseLiteException e) {

And in another method, I read all of them (all of them shall be fed to the adapter of my recycler view) using this snippet in another method named ‘readAll()’:

ArrayList tasks = new ArrayList<>();
Query allQuery =

    try {
        ResultSet results = allQuery.execute();

        if (results == null){
            break exitLabel;

        Log.v("MY TAG", "data from: " + currentDatabase.getName());
        for(Result result : results){

// String task = result.getString(“task”);
// Date dateCreated = result.getDate(“dateCreated”);
// Date dateStart = result.getDate(“dateStart”);
// boolean isDone = result.getBoolean(“isDone”);
// boolean isInProgress = result.getBoolean(“isInProgress”);

            String task = result.getString("task");
            String dateCreated = result.getString("dateCreated");
            String dateStart = result.getString("dateStart");
            String isDone = result.getString("isDone");
            String isInProgress = result.getString("isInProgress");

            Log.v("mUserDBManager.readAll", "task: " + task);
            Log.v("mUserDBManager.readAll", "date created: " + dateCreated);
            Log.v("mUserDBManager.readAll", "date start: " + dateStart);

            Date dummyDates = Calendar.getInstance().getTime();
            Task newTask = new Task(task, dummyDates, dummyDates);

// newTask.setDone(isDone);
// newTask.setInProgress(isInProgress);

    } catch (CouchbaseLiteException e) {

    return tasks;

The dummy dates are there during this time of me debugging my app, so at least the Task objects being created aren’t completely null, thus, not tanking my recycler view receiving Task objects with null members, however, looking at my logs, it seems that the data I’m getting from the should-just-be-simple result.getString() is null, as shown here:

The ones in the red box are calls to result.getString() giving me nulls, while the one in the green box are logs for when I checked if the ones I’m putting in the DB are non-nulls in the first place, and indeed, they are (I even logged it so it can be seen that both in my View layer (call of NewTask.saveTask()) and DBManager layer (UserDBManager.create()), the ones I’m inputting in the DB are non-nulls).

What am I missing here?

It looks like you are missing the very common trap that when you do a select all, the results are all stored in a dictionary with the name of the database, instead of being flattened into the root of the object. So you have to getDictionary with the name of your database as the key, and then all the values are inside there (as noted in the docs )