Skip to content
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

[Feat]: Improved persistence API #52

Open
widavies opened this issue Dec 26, 2021 · 1 comment
Open

[Feat]: Improved persistence API #52

widavies opened this issue Dec 26, 2021 · 1 comment
Assignees

Comments

@widavies
Copy link
Contributor

widavies commented Dec 26, 2021

It is tedious to create a RIOModel for every type that needs to get serialized to the database. A RIOModel for mobile requires a column for each top level field in the model within SQLite. This is very error prone - forgetting to update these when adding a new field is likely. Secondly, some fields can be disabled during shallow loads. A much cleaner solution here is an annotation for the class (like "@RIOPersistable") that will handle mapping all fields into database columns, and another field-level annotation for ("Shallow") meaning the field won't be loaded during a shallow load (or something like that).

A second, less-important issue is that IDs are a little messy as well. Maybe each model should inherit from a superclass or something.

@github-actions
Copy link

Community Note:

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and developers prioritize this request
  • Please do not leave "+1" or other similar comments that do not add relevant new information or questions
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@widavies widavies self-assigned this Dec 26, 2021
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

No branches or pull requests

1 participant