RobluScouting / RobluTodo

A central location for feature requests, proposed designs, and discussion regarding the future of Roblu.
1 stars 0 forks source link

[Feat]: Improved persistence API #52

Open widavies opened 2 years ago

widavies commented 2 years ago

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[bot] commented 2 years ago

Community Note: