Skip to content

Conversation

@vaind
Copy link
Contributor

@vaind vaind commented Nov 21, 2019

This PR is based on #74, please merge it first and then change the target of this PR to dev branch


Fixes #55

See issue for more context, in short: the generator wasn't usable when entities were spread across multiple files.

Changes the code generator to two steps:

  1. EntityResolver analyzes entities, producing .objectbox.info files in cache (not in project sources).
  2. CodeBuilder collects those, merges them into objectbox-model.json and creates a single objectbox.dart output file that should be included by the user code.

This PR also:

  • fixes removal of properties,
  • adds removal of entities,
  • some internal changes necessary to accept the new model class.

TODO:

  • update examples
  • fix/change generator tests
  • update doc/*.md and move to appropraite locations as those are code related, not user docs

@vaind
Copy link
Contributor Author

vaind commented Nov 21, 2019

P. S. I did use git mv but it still got confused so some generator sources are not diffed properly. Sorry about that.

@vaind vaind changed the base branch from 56-generated-model to dev November 25, 2019 12:25
@vaind vaind merged commit 215c557 into dev Nov 25, 2019
@vaind vaind deleted the generator-rework branch November 25, 2019 14:38
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.

3 participants