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

Basic save functionality in abstraction layer #19

Open
pobocks opened this issue Aug 22, 2018 · 1 comment
Open

Basic save functionality in abstraction layer #19

pobocks opened this issue Aug 22, 2018 · 1 comment

Comments

@pobocks
Copy link
Member

pobocks commented Aug 22, 2018

It's desirable to make it convenient to alter and save JSONModelObjects up to the database. Proposed API something like:

# On JSONModelObjects
def save(self, refetch_if_stale=True): 
    pass # signature, body omitted

my_obj = aspace.repositories(2).resources(1)
my_obj.dirty # False
my_obj.title = "a title"
my_obj.dirty # True
my_obj.save() # saves to ASpace
my_obj.dirty # False
@pobocks
Copy link
Member Author

pobocks commented Mar 2, 2019

This is gonna be waaaay more complex than I initially thought, because nested objects.

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