Skip to content

Conversation

@RossinesP
Copy link
Contributor

During initialization, SugarOrm parses all the classes in a specified package and finds all SugarRecord classes. This has been problematic in the past because of InstantRun and newest Gradle build tools.

This commit adds a way to manually declare the list of classes we want to convert to tables.
Simply provide a list of Class objects when calling SugarContext.init() or extend SugarApp and its getModelsClassesList() method.
All of this is obviously optional.

Note that no test and no example app has been written for this modification.

@mention-bot
Copy link

@RossinesP, thanks for your PR! By analyzing the history of the files in this pull request, we identified @JonatanSalas, @sibelius and @whoshuu to be potential reviewers.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 74.536% when pulling d55f915 on RossinesP:manual_init into cb45742 on satyan:master.

@gstorer
Copy link

gstorer commented Apr 6, 2017

Just a heads up. getModelsClassesList() isn't called anywhere. I had to modify SugarApp.onCreate() to use the list accepting version of SugarContext.init() to get this to work with the method over ride. It works fine manually calling the init method though.

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.

4 participants