Current access mode is sync. All properties are provided as they're kept in memory.
If value was not yet retrieved from database, it just resolves as undefined (or with default value from underlying prototype).
Additionally via getObservable we can get observable objects for given properties which emit events when value for property changes.
It'll be good to introduce different object representations
Sync: so one as it's now, where values for keys are resolves always with sync values.
Async: One that resolves at all times with Observable & Promise values. It will require custom promise implementation which is also an emitter, has resolved value mutable and resolves then callbacks sync way in settled state. That one could transparently work with persistent layer and resolve certain records on demand
Current access mode is sync. All properties are provided as they're kept in memory. If value was not yet retrieved from database, it just resolves as
undefined
(or with default value from underlying prototype).Additionally via
getObservable
we can get observable objects for given properties which emit events when value for property changes.It'll be good to introduce different object representations
then
callbacks sync way in settled state. That one could transparently work with persistent layer and resolve certain records on demand