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.
Scenario
Calling
Simpla.set('foo.bar.baz', { ... })
, before having callingset
/get
on either ancestorfoo
orfoo.bar
, may result in incorrect data being stored in the buffer forfoo
andfoo.bar
- meaning that callingSimpla.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 viaSimpla.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 thatfoo
andfoo.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.