Java POJO Object
public class Section {
@ColumnInfo(name=\"section_id\")
public int mSectionId;
@ColumnInfo(name=\"section_name\")
public S
I resolved the similar issue as follows
Inside your ViewModel class
private LiveData<List<Section>> mSections;
@Override
public LiveData<List<Section>> getAllSections() {
if (mSections == null) {
mSections = mDb.sectionDAO().getAllSections();
}
return mSections;
}
This is all required. Never change the LiveData's instance.