Understanding Deleting and Deleting Relationships in greenDao

First question: when does greenDao generate a delete function for an object? And what's the difference between calls to entity.delete() and session.getEntityDao.delete(entity) ?

Secondly, if I delete a parent with a child that has a ToOne relationship with the parent, I must delete the child myself, right? In fact, the automatic dependency "cleaning" is not performed, right?

+8
android orm greendao
source share
1 answer

entity.delete() requires the object to be "active", dao.delete(entity) works for all objects.

There are no cascading deletions in greenDAO; you must delete objects separately.

+16
source share

All Articles