문제

First question is, when does greenDao generate a delete function for a entity? And what's the difference between calling the entity.delete() and the session.getEntityDao.delete(entity)?

Second, if I delete a parent entity with a child that has ToOne relation to the parent, I have to remove the child by myself, don't I? Actually no automatic dependency "cleaning" is done, is that right?

도움이 되었습니까?

해결책

entity.delete() requires an entity to be "active", dao.delete(entity) works for all entities.

There are no cascading deletes in greenDAO, you got to delete entities individually.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top