设置好一对多关系之后,在获取对象List的时候报出该错误,请问是什么原因?
- public List getCasesFormInfoList() { if (casesFormInfoList == null) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } CasesFormInfoDao targetDao = daoSession.getCasesFormInfoDao(); List casesFormInfoListNew = targetDao._queryCasesFormCategoryInfo_CasesFormInfoList(paramid); synchronized (this) { if(casesFormInfoList == null) { casesFormInfoList = casesFormInfoListNew; } } } return casesFormInfoList; } 有时正常,不稳定。 de.greenrobot.dao.DaoException: Entity is detached from DAO context