Skip to content

Automatically generate IDs and UIDs for entities and properties #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Oct 3, 2019

Conversation

nalenz-objectbox
Copy link
Contributor

See #18.

Copy link
Contributor

@vaind vaind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While dart can be run as a script, it's supposed to be compiled for "dartaotruntime" for production. Thus it can't really just read the model.json from the current directory. Or am I missing something?

All the other bindings handle this by including all necessary information (ID, UID, Type in DB) in the generated files.

However, it seems the model file could be embedded in a package with - https://pub.dev/packages/resource.

Since that still comes with a performance & size drawback, consider whether using parts of the original generator code would make sense, thus completely avoiding having to deal with resources and possibly two ways of loading the file (compiled vs in VM)

@vaind
Copy link
Contributor

vaind commented Sep 26, 2019

Also don't forget to rebase/merge changes from dev

@vaind
Copy link
Contributor

vaind commented Oct 2, 2019

The remaining things before this PR can be merged:

  • rebase/merge the dev branch
  • tests - e.g. generate code for multiple entities, not just one. Swift & Go bindings do tests by comparing the generated code & model to an "expected" version for each test case (a folder here: https://github.com/objectbox/objectbox-go/tree/master/test/generator/testdata). No need to go to such extent but at least some tests should be there
  • at least some basic docs for the new classes

@Buggaboo
Copy link
Contributor

Buggaboo commented Oct 2, 2019

I'm currently working on doing Queries, is the boolean / byte / double / long implementation for generating properties included in this branch?

@vaind vaind mentioned this pull request Oct 3, 2019
3 tasks
# Conflicts:
#	test/basics_test.dart
#	test/box_test.dart
#	test/test.dart
@vaind vaind force-pushed the 18-automatic-id-generation branch from c46a64a to ab451b6 Compare October 3, 2019 13:27
@vaind vaind force-pushed the 18-automatic-id-generation branch from ab451b6 to 956f5a8 Compare October 3, 2019 13:33
@vaind
Copy link
Contributor

vaind commented Oct 3, 2019

Merging this into dev, please add the missing class docs directly on dev branch @nalenz-objectbox

@vaind vaind merged commit 7c5536d into dev Oct 3, 2019
@vaind vaind deleted the 18-automatic-id-generation branch October 3, 2019 14:11
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