Unable to persist create records using Loki as adapter
See original GitHub issueI have added watermelondb + Loki to a project and when creating records the raw values are all the default values of empty strings and 0 numbers. When I log out the records during the batch creation they are there but upon retrieval the raw values are the defaults.
When writing directly to the raw field it does persist, ie: lpEvent._raw.block_number
Here is the actual create action in the repo branch: https://github.com/status-im/liquid-funding/blob/watermelon-data-persist/app/actions/lpEvents.js#L19
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Troubleshooting | Grafana Loki documentation
This error can appear in Grafana when Grafana Loki is added as a datasource, indicating that Grafana in unable to connect to Loki....
Read more >Unable to loadDatabase with lokiJs - Stack Overflow
I have trying to create a database with a collection added to this database and the changes saved to a IndexedDB. Two controllers...
Read more >Logging with the LokiStack | OpenShift Container Platform 4.10
LokiStack's proxy uses OpenShift Container Platform authentication to enforce multi-tenancy. Loki refers to the log store as either the individual component or ...
Read more >error running loki err=invalid database\nerror creating index ...
As a workaround we always have to delete all folders named "index_#" (mentioned in the log) in the storage and then restart loki-0...
Read more >Structured logging in Elixir using Loki - Alex Koutmos
And finally we'll set up a simple Phoenix application backed by Postgres and run Loki along side it to collect all of our...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems using a decorator on a class property is simply ignored by babel for some reason.
I got it to work using this approach:
By declaring it as a method babel no longer discards it, and I had to create the
initialize
decorator in order to get around this invariant: https://github.com/Nozbe/WatermelonDB/blob/master/src/decorators/common.js#L21-L25Which leads me to ask, why is that invariant needed?
I believe I found the issue. I think it’s related to: https://github.com/babel/babel/issues/8417
Here is the fix in my webpack config: https://github.com/status-im/liquid-funding/commit/2bc3e5fd3426bd91ee8d70e2d43b9ce11e370299