Skip to content

Add method to get all DAOs available#207

Open
bryant1410 wants to merge 1 commit into
greenrobot:masterfrom
xmartlabs:get-all-daos
Open

Add method to get all DAOs available#207
bryant1410 wants to merge 1 commit into
greenrobot:masterfrom
xmartlabs:get-all-daos

Conversation

@bryant1410

Copy link
Copy Markdown

No description provided.

@greenrobot

Copy link
Copy Markdown
Owner

Why would you want to expose that?

@greenrobot greenrobot closed this Sep 10, 2015
@bryant1410

Copy link
Copy Markdown
Author

In order to delete all entities of all types, being independent of which ones exists

@greenrobot

Copy link
Copy Markdown
Owner

Hmm, will think about it. It would be like reflection to access the metamodel for the app.

@greenrobot greenrobot reopened this Sep 10, 2015
@bryant1410

Copy link
Copy Markdown
Author

I use it in the following method:

public static void deleteAll() {
    for (AbstractDao<?, ?> dao : getDaoSession().getAllDaos()) {
        dao.deleteAll();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants