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

Implicitly created hierarchies should hydrate from API #53

Open
bedeoverend opened this issue Mar 5, 2017 · 0 comments
Open

Implicitly created hierarchies should hydrate from API #53

bedeoverend opened this issue Mar 5, 2017 · 0 comments
Assignees
Labels

Comments

@bedeoverend
Copy link
Contributor

bedeoverend commented Mar 5, 2017

Scenario

Calling Simpla.set('foo.bar.baz', { ... }), before having calling set / get on either ancestor foo or foo.bar, may result in incorrect data being stored in the buffer for foo and foo.bar - meaning that calling Simpla.get on either may return incorrect data.

Expected behaviour

Calling Simpla.get('foo.bar') will always respond with the data previously saved and stored remotely, or, data that's been explicitly set locally via Simpla.set('foo.bar')

Actual behaviour

Simpla.get('foo.bar') may return blank data, even though data has been set to the API.

Analysis

Calling Simpla.set('foo.bar.baz', { ... }) will cause the SDK to ensure that foo and foo.bar exist in the buffer, even if just blank - to replicate the functionality of the remote API. Instead, if it doesn't exist in the buffer, it should check if it doesn't exist in the remote API, then should set blank data iff it doesn't exist there.

@madeleineostoja madeleineostoja changed the title [v2] Implicitly created hierarchies should hydrate from API Implicitly created hierarchies should hydrate from API Apr 13, 2017
@madeleineostoja madeleineostoja added this to the v3 milestone May 16, 2017
@madeleineostoja madeleineostoja removed this from the v3 milestone Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants