[GH-ISSUE #22] Realtime synchronization with a live data proxy not persisting to db #22

Closed
opened 2026-05-23 08:25:52 -06:00 by gitea-mirror · 33 comments
Owner

Originally created by @clibu on GitHub (Mar 17, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/22

Originally assigned to: @appy-one on GitHub.

I've written code based on https://github.com/appy-one/acebase#realtime-synchronization-with-a-live-data-proxy and have traced through the AceBase code in data-proxy.ts and can see the underlying object get changed in set(target, prop, value, receiver) however nothing is written to the database and there are no errors.

set() calls context.flag('write', context.target.concat(prop)); which calls scheduleSync() but db isn't updated.

The specific property is a string assignment.

This is using IndexedDb in the Browser.

Originally created by @clibu on GitHub (Mar 17, 2021). Original GitHub issue: https://github.com/appy-one/acebase/issues/22 Originally assigned to: @appy-one on GitHub. I've written code based on https://github.com/appy-one/acebase#realtime-synchronization-with-a-live-data-proxy and have traced through the AceBase code in ``data-proxy.ts`` and can see the underlying object get changed in ```set(target, prop, value, receiver)``` however nothing is written to the database and there are no errors. ```set()``` calls ```context.flag('write', context.target.concat(prop));``` which calls ``scheduleSync()`` but db isn't updated. The specific property is a string assignment. This is using IndexedDb in the Browser.
gitea-mirror 2026-05-23 08:25:52 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

A bit more info. Sometimes the data persists. I can't see a pattern. Maybe timing related. I've also see an empty IndexedDB record. ie. value is {} instead of { someKey: "someValue" }

<!-- gh-comment-id:800975721 --> @clibu commented on GitHub (Mar 17, 2021): A bit more info. Sometimes the data persists. I can't see a pattern. Maybe timing related. I've also see an empty IndexedDB record. ie. ``value`` is ``{}`` instead of ``{ someKey: "someValue" }``
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

Can you tell me a bit more about your setup? Are you using an AceBase instance with IndexedDB storage in combination with an AceBaseClient that syncs to a server, or just the IndexedDB as standalone db? Also, let me know which versions of the acebase packages you are using

<!-- gh-comment-id:800978242 --> @appy-one commented on GitHub (Mar 17, 2021): Can you tell me a bit more about your setup? Are you using an AceBase instance with IndexedDB storage in combination with an AceBaseClient that syncs to a server, or just the IndexedDB as standalone db? Also, let me know which versions of the acebase packages you are using
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

AceBase standalone with IndexedDB in the Browser. acebase": "^1.1.4

I'll update to the latest version.

<!-- gh-comment-id:800980186 --> @clibu commented on GitHub (Mar 17, 2021): AceBase standalone with IndexedDB in the Browser. acebase": "^1.1.4 I'll update to the latest version.
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

Updated to "acebase": "^1.2.3", - Same problems.

<!-- gh-comment-id:800983614 --> @clibu commented on GitHub (Mar 17, 2021): Updated to "acebase": "^1.2.3", - Same problems.
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

I don't know if it is relevant but the path is just one node. ie "clibu_app" vs "clibu_app/blah"

<!-- gh-comment-id:800985333 --> @clibu commented on GitHub (Mar 17, 2021): I don't know if it is relevant but the path is just one node. ie "clibu_app" vs "clibu_app/blah"
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

Thanks, I'll try to reproduce

<!-- gh-comment-id:800989250 --> @appy-one commented on GitHub (Mar 17, 2021): Thanks, I'll try to reproduce
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

I've tested a couple of things but can't reproduce. What I should change to get it to fail?

const db = AceBase.WithIndexedDB('debug');
db.ready(async () => {
   const ref = db.ref('test');
   const proxy = await ref.proxy({});
   const obj = proxy.value;
   
   // Change 'string' property:
   obj.string = 'Testing ' + Math.random();
   
   setTimeout(async () => {
      // Running with delay to make sure value was written
      const snap = await ref.get();
      const val = snap.val();
      console.assert(obj.string === val.string, 'wrong string'); // Ok
   }, 1000);
});
<!-- gh-comment-id:801011131 --> @appy-one commented on GitHub (Mar 17, 2021): I've tested a couple of things but can't reproduce. What I should change to get it to fail? ```js const db = AceBase.WithIndexedDB('debug'); db.ready(async () => { const ref = db.ref('test'); const proxy = await ref.proxy({}); const obj = proxy.value; // Change 'string' property: obj.string = 'Testing ' + Math.random(); setTimeout(async () => { // Running with delay to make sure value was written const snap = await ref.get(); const val = snap.val(); console.assert(obj.string === val.string, 'wrong string'); // Ok }, 1000); }); ```
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

Same problem with your sample code. TypeError: Cannot read property 'string' of null in the assert() call. And nothing in the IndexedDB table.

I'll dig deeper into the code and see what I can find.

FYI it is 6:50am now here in Australia. A new day starts.

<!-- gh-comment-id:801376400 --> @clibu commented on GitHub (Mar 17, 2021): Same problem with your sample code. ```TypeError: Cannot read property 'string' of null``` in the ```assert()``` call. And nothing in the IndexedDB table. I'll dig deeper into the code and see what I can find. FYI it is 6:50am now here in Australia. A new day starts.
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

Goodmorning early bird! 21:30 here in The Netherlands. 😊
Can you check the version of acebase-core in your node_modules. The latest version is 1.2.3.
You might want to npm uninstall acebase and npm install acebase to make sure the latest acebase-core is installed. I've fixed quite a few proxy issues, which is in the core package.

<!-- gh-comment-id:801424667 --> @appy-one commented on GitHub (Mar 17, 2021): Goodmorning early bird! 21:30 here in The Netherlands. 😊 Can you check the version of acebase-core in your node_modules. The latest version is 1.2.3. You might want to ```npm uninstall acebase``` and ```npm install acebase``` to make sure the latest acebase-core is installed. I've fixed quite a few proxy issues, which is in the core package.
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

FWIW I'm using yarn. I did a yarn remove acebase yesterday and yarn add acebase

package.json for acebase-core is "version": "1.2.3"

For you sample code when it fails I just see:

[debug] Read node "/" and (filtered) descendants from 1 records
storage-custom.js:671 
[debug] Node "/" is being updated

twice.

When it works ok I also see:

[debug] Read node "/test" and descendants from 1 records

I'm starting to suspect some interference from other IndexedDB libs I'm using maybe causing this. More in next post.

<!-- gh-comment-id:801434435 --> @clibu commented on GitHub (Mar 17, 2021): FWIW I'm using yarn. I did a ``yarn remove acebase`` yesterday and ``yarn add acebase`` package.json for acebase-core is "version": "1.2.3" For you sample code when it fails I just see: ```` [debug] Read node "/" and (filtered) descendants from 1 records storage-custom.js:671 [debug] Node "/" is being updated ```` twice. When it works ok I also see: ```` [debug] Read node "/test" and descendants from 1 records ```` I'm starting to suspect some interference from other IndexedDB libs I'm using maybe causing this. More in next post.
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

I'm using nanoSQL as the main db lib at present and Logux.io for Server Sync which also uses IndexedDB. I've been using both of these for quite some time without any issues. I'm looking at using AceBase to use as well as nanoSQL or possibly to replace it.

I've isolated nanoSQL and Logux so I only use AceBase proxy and am still seeing the same issue. I haven't noticed any issues using AceBase db.ref( path ).update( doc )

I'm not sure what to try next. I can tell you that if I step through a proxy update in the Chrome Debugger then it is more likely to work ok.

<!-- gh-comment-id:801441841 --> @clibu commented on GitHub (Mar 17, 2021): I'm using [nanoSQL ](https://nanosql.io/) as the main db lib at present and [Logux.io](https://logux.io/) for Server Sync which also uses IndexedDB. I've been using both of these for quite some time without any issues. I'm looking at using AceBase to use as well as nanoSQL or possibly to replace it. I've isolated nanoSQL and Logux so I only use AceBase proxy and am still seeing the same issue. I haven't noticed any issues using AceBase ```db.ref( path ).update( doc )``` I'm not sure what to try next. I can tell you that if I step through a proxy update in the Chrome Debugger then it is more likely to work ok.
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

Some more info. I'm toggling the value displayNotesInGrid between true and false of and seeing the following.

[ClibuAppAB] Node "/clibu_app" is being updated
storage-custom.js:818 [ClibuAppAB] Node "/clibu_app/displayNotesInGrid" is being deleted
storage-custom.js:840 [ClibuAppAB] Nodes "/clibu_app/displayNotesInGrid" are being deleted

The target[prop] = value; at line 937 in data-proxy.ts is correct. However "/clibu_app/displayNotesInGrid" is not present in IndexedDB. Just key: "clibu_app", value: {}

<!-- gh-comment-id:801452133 --> @clibu commented on GitHub (Mar 17, 2021): Some more info. I'm toggling the value ``displayNotesInGrid`` between true and false of and seeing the following. ```` [ClibuAppAB] Node "/clibu_app" is being updated storage-custom.js:818 [ClibuAppAB] Node "/clibu_app/displayNotesInGrid" is being deleted storage-custom.js:840 [ClibuAppAB] Nodes "/clibu_app/displayNotesInGrid" are being deleted ```` The `` target[prop] = value;`` at line 937 in data-proxy.ts is correct. However "/clibu_app/displayNotesInGrid" is not present in IndexedDB. Just key: "clibu_app", value: {}
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

Have you tried removing/clearing the db for a fresh start? Do you get the same results?

<!-- gh-comment-id:801456457 --> @appy-one commented on GitHub (Mar 17, 2021): Have you tried removing/clearing the db for a fresh start? Do you get the same results?
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

Yes many times. Helps for a bit then the issues reappear.
I've now just seen:
key: "", value: {clibu_app: {…}}
which is really odd as clibu_app is never used as property value.

<!-- gh-comment-id:801464837 --> @clibu commented on GitHub (Mar 17, 2021): Yes many times. Helps for a bit then the issues reappear. I've now just seen: ```key: "", value: {clibu_app: {…}}``` which is really odd as clibu_app is never used as property value.
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

This is really hard without being able to reproduce. Are you using multiple proxies at the same time, other code that monitors values, or code that might change values in the db at the same time?

<!-- gh-comment-id:801470247 --> @appy-one commented on GitHub (Mar 17, 2021): This is really hard without being able to reproduce. Are you using multiple proxies at the same time, other code that monitors values, or code that might change values in the db at the same time?
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

Can you set logLevel to 'verbose': const db = AceBase.WithIndexedDB('debug', { logLevel: 'verbose' });, run the test code from above and copy/paste the console output?

<!-- gh-comment-id:801474393 --> @appy-one commented on GitHub (Mar 17, 2021): Can you set logLevel to 'verbose': ```const db = AceBase.WithIndexedDB('debug', { logLevel: 'verbose' });```, run the test code from above and copy/paste the console output?
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

There is another Proxy on the same DB but only the one with your sample code. I'll remove all of my AceBase code and just use your sample with verbose - after I've had some breakfast.😀

<!-- gh-comment-id:801475475 --> @clibu commented on GitHub (Mar 17, 2021): There is another Proxy on the same DB but only the one with your sample code. I'll remove all of my AceBase code and just use your sample with verbose - after I've had some breakfast.😀
Author
Owner

@appy-one commented on GitHub (Mar 17, 2021):

Enjoy your breakfast. I might be sleeping when you come back 😂

<!-- gh-comment-id:801476664 --> @appy-one commented on GitHub (Mar 17, 2021): Enjoy your breakfast. I might be sleeping when you come back 😂
Author
Owner

@clibu commented on GitHub (Mar 17, 2021):

Sleep well.😀 I'll keep trying to narrow this down.
I've removed all of my AceBase code and now just have you sample. I delete the db and refresh the Browser. Sometimes it works other times the assert raises an exception as per my earlier post.

This is the verbose output from a crash.

[debug] Database "debug" details:
storage-custom.js:333 [debug] - Type: CustomStorage
storage-custom.js:334 [debug] - Path: .
storage-custom.js:335 [debug] - Max inline value size: 50
storage-custom.js:336 [debug] - Autoremove undefined props: false
storage-custom.js:776 [debug] Node "/" is being created
storage-custom.js:1095 [debug] Read node "/" and (filtered) descendants from 1 records
storage-custom.js:671 [debug] Node "/" is being updated
storage-custom.js:1095 [debug] Read node "/" and (filtered) descendants from 1 records
storage-custom.js:671 [debug] Node "/" is being updated

Uncaught (in promise) TypeError: Cannot read property 'string' of null

debug.acebase db:
key: "", value: {}

I think I'll create a new app with just your code.

<!-- gh-comment-id:801508921 --> @clibu commented on GitHub (Mar 17, 2021): Sleep well.😀 I'll keep trying to narrow this down. I've removed all of my AceBase code and now just have you sample. I delete the db and refresh the Browser. Sometimes it works other times the assert raises an exception as per my earlier post. This is the verbose output from a crash. ```` [debug] Database "debug" details: storage-custom.js:333 [debug] - Type: CustomStorage storage-custom.js:334 [debug] - Path: . storage-custom.js:335 [debug] - Max inline value size: 50 storage-custom.js:336 [debug] - Autoremove undefined props: false storage-custom.js:776 [debug] Node "/" is being created storage-custom.js:1095 [debug] Read node "/" and (filtered) descendants from 1 records storage-custom.js:671 [debug] Node "/" is being updated storage-custom.js:1095 [debug] Read node "/" and (filtered) descendants from 1 records storage-custom.js:671 [debug] Node "/" is being updated Uncaught (in promise) TypeError: Cannot read property 'string' of null ```` debug.acebase db: ```key: "", value: {}``` I think I'll create a new app with just your code.
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

Ok I created the attached Node app and am seeing the same issue.
AceBase V1.2.3 Node v15.11.0 Windows 10 Home Version 10.0.19042 Build 19042 Dell XPS 15

[debug] Database "debug" details:
[debug] - Type: AceBase binary
[debug] - Record size: 128
[debug] - Page size: 1024
[debug] - Max inline value size: 50
[debug] - Root record address: 0, 0
[debug] KIT read, 0 keys indexed
[debug] FST read, 0 pages allocated, 0 free ranges
[debug] Node "/" is being created
[debug] Allocated 1 addresses for node "/": 0,0+0
[debug] Node "/" saved at address 0,0 - 1 addresses, 4 bytes written in 1 chunk(s)
[debug] Node "/" is being created
[debug] Allocated 1 addresses for node "/": 0,1+0
[debug] Node "/" saved at address 0,1 - 1 addresses, 8 bytes written in 1 chunk(s)
[debug] Root record address updated to 0, 1
[debug] Node "/test" is being overwritten
[debug] Allocated 1 addresses for node "/test": 0,2+0
[debug] Node "/test" saved at address 0,2 - 1 addresses, 4 bytes written in 1 chunk(s)
[debug] Node "/" being updated: adding 0 keys (), updating 1 keys ("test"), removing 0 keys ()
[debug] Node "/" saved at address 0,1 - 1 addresses, 14 bytes written in 1 chunk(s)
[debug] Reading node "/test" from address 0,2
Assertion failed: wrong string
val: {}

I delete the debug.acebase folder and > node proxy1.js and get the same error every time. If I don't delete the folder and run it a second time it works as expected.

I also ran just your sample code in the Browser and as before - worked sometimes.

I hope you can reproduce it with the attached files.

proxy1.zip

<!-- gh-comment-id:801519098 --> @clibu commented on GitHub (Mar 18, 2021): Ok I created the attached Node app and am seeing the same issue. AceBase V1.2.3 Node v15.11.0 Windows 10 Home Version 10.0.19042 Build 19042 Dell XPS 15 ```` [debug] Database "debug" details: [debug] - Type: AceBase binary [debug] - Record size: 128 [debug] - Page size: 1024 [debug] - Max inline value size: 50 [debug] - Root record address: 0, 0 [debug] KIT read, 0 keys indexed [debug] FST read, 0 pages allocated, 0 free ranges [debug] Node "/" is being created [debug] Allocated 1 addresses for node "/": 0,0+0 [debug] Node "/" saved at address 0,0 - 1 addresses, 4 bytes written in 1 chunk(s) [debug] Node "/" is being created [debug] Allocated 1 addresses for node "/": 0,1+0 [debug] Node "/" saved at address 0,1 - 1 addresses, 8 bytes written in 1 chunk(s) [debug] Root record address updated to 0, 1 [debug] Node "/test" is being overwritten [debug] Allocated 1 addresses for node "/test": 0,2+0 [debug] Node "/test" saved at address 0,2 - 1 addresses, 4 bytes written in 1 chunk(s) [debug] Node "/" being updated: adding 0 keys (), updating 1 keys ("test"), removing 0 keys () [debug] Node "/" saved at address 0,1 - 1 addresses, 14 bytes written in 1 chunk(s) [debug] Reading node "/test" from address 0,2 Assertion failed: wrong string val: {} ```` I delete the ``debug.acebase`` folder and ``> node proxy1.js`` and get the same error every time. If I don't delete the folder and run it a second time it works as expected. I also ran just your sample code in the Browser and as before - worked sometimes. I hope you can reproduce it with the attached files. [proxy1.zip](https://github.com/appy-one/acebase/files/6160417/proxy1.zip)
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

More info. I've rebooted my XPS15 and same problem. I also tried it on another Win10 Desktop PC - same problem. I updated Node on it to the latest release 15.12.0

<!-- gh-comment-id:801613078 --> @clibu commented on GitHub (Mar 18, 2021): More info. I've rebooted my XPS15 and same problem. I also tried it on another Win10 Desktop PC - same problem. I updated Node on it to the latest release 15.12.0
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

Thanks! 👍🏼 I'll dive into it after I've taken the kids to school

<!-- gh-comment-id:801688658 --> @appy-one commented on GitHub (Mar 18, 2021): Thanks! 👍🏼 I'll dive into it after I've taken the kids to school
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

Looks like I found the issue 🥳

<!-- gh-comment-id:801755876 --> @appy-one commented on GitHub (Mar 18, 2021): Looks like I found the issue 🥳
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

👍 I hope you were able to reproduce it.

<!-- gh-comment-id:801759978 --> @clibu commented on GitHub (Mar 18, 2021): 👍 I hope you were able to reproduce it.
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

Yes! I've made a couple of changes, will publish after some more testing

<!-- gh-comment-id:801795351 --> @appy-one commented on GitHub (Mar 18, 2021): Yes! I've made a couple of changes, will publish after some more testing
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

I published my changes in acebase-core v1.2.4, let me know if this fixes it!

<!-- gh-comment-id:801812170 --> @appy-one commented on GitHub (Mar 18, 2021): I published my changes in acebase-core v1.2.4, let me know if this fixes it!
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

Look forward to trying it.
Were you able to reproduce the issue?

On Thu, 18 Mar 2021, 21:10 Ewout Stortenbeker, @.***>
wrote:

Yes! I've made a couple of changes, will publish after some more testing


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/appy-one/acebase/issues/22#issuecomment-801795351,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADBUM3QLW2ILPWI2ZFRO4R3TEHGQLANCNFSM4ZKDF5ZA
.

<!-- gh-comment-id:801813981 --> @clibu commented on GitHub (Mar 18, 2021): Look forward to trying it. Were you able to reproduce the issue? On Thu, 18 Mar 2021, 21:10 Ewout Stortenbeker, ***@***.***> wrote: > Yes! I've made a couple of changes, will publish after some more testing > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/appy-one/acebase/issues/22#issuecomment-801795351>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ADBUM3QLW2ILPWI2ZFRO4R3TEHGQLANCNFSM4ZKDF5ZA> > . >
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

I was able to reproduce the failing assert upon creation of the record, not on updates thereafter. BUT, there were a couple things that could have caused those to fail:

  1. the context (ref.context({ acebase_proxy: {...} })) used to update the database was not set for setting the default value, causing the proxy to think the value was updated from an external source, overwriting the in-memory cache value.
  2. the DataReference used by the proxy was the same instance as the one used to create the proxy, causing the context set by the proxy to also be used by other code performing update operations on that same DataReference - causing the proxy to think the update was done by itself, not updating its cached value.
  3. If the proxy target value itself was updated, the cache object reference was updated inside the proxy code, but the external code using the proxy was still poking in the old referenced cache object.
<!-- gh-comment-id:801826374 --> @appy-one commented on GitHub (Mar 18, 2021): I was able to reproduce the failing assert upon creation of the record, not on updates thereafter. BUT, there were a couple things that could have caused those to fail: 1) the context (```ref.context({ acebase_proxy: {...} })```) used to update the database was not set for setting the default value, causing the proxy to think the value was updated from an external source, overwriting the in-memory cache value. 2) the ```DataReference``` used by the proxy was the same instance as the one used to create the proxy, causing the context set by the proxy to also be used by other code performing update operations on that same ```DataReference``` - causing the proxy to think the update was done by itself, not updating its cached value. 3) If the proxy target value itself was updated, the ```cache``` object reference was updated inside the proxy code, but the external code using the proxy was still poking in the old referenced ```cache``` object.
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

Ok, looking much, much better. I am seeing one weird thing, but it might be my code. I'll look into it in the morning,

Thanks for looking at this so quickly.

<!-- gh-comment-id:801843092 --> @clibu commented on GitHub (Mar 18, 2021): Ok, looking much, much better. I am seeing one weird thing, but it might be my code. I'll look into it in the morning, Thanks for looking at this so quickly.
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

This seems a little odd, I just want to check with you.

I've got a path named: "'clibu_app'" which is Proxied. When I start the app, and "'clibu_app'" has no IndexedDB record and I don't assign any key/value to it I'm seeing key: "", value: "{clibu_app: { clibu_app } }". Expanding this in Chrome DevTools shows "No properties".

As soon as I assign a value everything looks as I would expect. key: "". value: {} and a new record key: "clibu_app", value: {someObject}

Other than that all seem ok so far. But I haven't had breakfast yet.😉

<!-- gh-comment-id:802281653 --> @clibu commented on GitHub (Mar 18, 2021): This seems a little odd, I just want to check with you. I've got a path named: "'clibu_app'" which is Proxied. When I start the app, and "'clibu_app'" has no IndexedDB record and I don't assign any key/value to it I'm seeing ```key: "", value: "{clibu_app: { clibu_app } }"```. Expanding this in Chrome DevTools shows "No properties". As soon as I assign a value everything looks as I would expect. ``key: "". value: {}`` and a new record ``key: "clibu_app", value: {someObject}`` Other than that all seem ok so far. But I haven't had breakfast yet.😉
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

Yes, that is by design. I would guess you create the proxy using default value {} like so db.ref('clibu_app').proxy({})? This will create the path "clibu_app" with value {} if it doesn't exist. Because it's an empty object (has no children), it is stored in the parent record. Once you assign properties to the "clibu_app" node, it will be stored in its own dedicated record.

<!-- gh-comment-id:802300883 --> @appy-one commented on GitHub (Mar 18, 2021): Yes, that is by design. I would guess you create the proxy using default value ```{}``` like so ```db.ref('clibu_app').proxy({})```? This will create the path "clibu_app" with value ```{}``` if it doesn't exist. Because it's an empty object (has no children), it is stored in the parent record. Once you assign properties to the "clibu_app" node, it will be stored in its own dedicated record.
Author
Owner

@clibu commented on GitHub (Mar 18, 2021):

Thanks and understood. It just looked a little odd. Hopefully full steam ahead now. I have other questions and suggestions, but will leave those until I get further into using AceBase.

<!-- gh-comment-id:802305368 --> @clibu commented on GitHub (Mar 18, 2021): Thanks and understood. It just looked a little odd. Hopefully full steam ahead now. I have other questions and suggestions, but will leave those until I get further into using AceBase.
Author
Owner

@appy-one commented on GitHub (Mar 18, 2021):

You're welcome, Closing this one!

<!-- gh-comment-id:802313657 --> @appy-one commented on GitHub (Mar 18, 2021): You're welcome, Closing this one!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#22
No description provided.