WatermelonDB is a cross-platform high-level layer for dealing with data, but can be plugged in to any underlying database, depending on platform needs. The adapter merely performs simple CRUD (create/read/update/delete) operations. WatermelonDB comes with two concrete implementations: 1) SQLiteAdapter is an adapter for React Native, based on SQLite 2) LokiJSAdapter is an adapter for the web, based around LokiJS
Questions tagged [watermelondb]
41 questions
6
votes
0 answers
Undefined is not an object evaluating adapter.schema
I am trying to integrate WatermelonDb in my React Native App.
I am getting an error saying undefined is not an object(evaluating adapter.schema)
I followed this GitHub issue
https://github.com/Nozbe/WatermelonDB/issues/40
but it didn't gave any…
user10241787
4
votes
3 answers
React Native watermelon db collection returns undefined
thanks in advance
Iam using watermelon db in react native android it returns undefined for the collection.
const handleDB = async () => {
const myCollection = database.collections.get('data_items')
await database.action(async () => {
…

Ankit Jayaprakash
- 1,040
- 3
- 15
- 31
4
votes
2 answers
Fetch Data from WatermelonDB in React
I am using WatermelonDB as a local database of my app.
I have a method getPlaces() inside a class AccessDB:
static async getPlaces() {
const postsCollection = database.collections.get('places');
const allPosts = await…

j.Doe
- 202
- 4
- 18
3
votes
1 answer
WatermelonDB [Diagnostic error: Passed undefined to query]
Good night everyone, I have the following problem.
I'm using a sync function from WatermelonDB but it's giving this error when it runs.
I'm sure an object manually to see why it doesn't work.
And that same object works if it's inserted out of…

caiquegl
- 31
- 2
2
votes
1 answer
WatermelonDB w ReactNative: How to use @actions in models properly?
WatermelonDB with ReactNative 0.64
I am trying to add a generate action inside the model like this:
class Events extends Model {
static table = 'events';
@field('event_at') event_at;
@field('trigger') trigger;
// other fields
@action…

diganta das
- 123
- 1
- 5
2
votes
0 answers
How i use 'withChangesForTables' in my project, of the best way?
i'm used Watermelon DB in my project react native >= 0.60, and i have a question, how i use 'withChangesForTables' in my project, of the best way ?
i'm try this:
import { useDatabase } from '@nozbe/watermelondb/hooks'
export default function…

uellingtonpalma
- 33
- 6
1
vote
1 answer
Support for the experimental syntax 'decorators' isn't currently enabled (8:3):
I am trying to use @field in my react.js application. This application is bought theme from Themeforest. The error i am facing is this
ERROR in ./src/watermelon/model/Staff.js
Module build failed (from…

web pakistan
- 444
- 1
- 4
- 16
1
vote
1 answer
WatermelonDB : Fetching along with linked records
I am new to watermelon DB and was stuck on one use case. What if I have a two records
Transaction: id, account_id, amount, time
Account: id, title, description
I need to fetch all the transactions along with the accounts which are linked to them,…

raghav nagpure
- 63
- 4
1
vote
0 answers
WatermelonDB sync pull app crash facing java.lang.OutOfMemoryError in React Native android
I am facing java.lang.OutOfMemoryError in React Native android platform while WatermelonDB sync pull api call. I have checked the API response size in Postman, getting 125 MB. The android app is crashing but IOS App working fine.
I am using Axios…

Diptesh Atha
- 851
- 8
- 18
1
vote
1 answer
Installing WatermelonDB from github gives "Unable to resolve module @nozbe/watermelondb/adapters/sqlite"
I am trying to compile a hello-world react-native app that has WatermelonDB configured. I am following the instructions given here and and here to set up the project for Watermelon.
I have found that if I install WatermelonDB using
yarn add…

BruceHill
- 6,954
- 8
- 62
- 114
1
vote
0 answers
Building with EAS BUILDING fails
I'm working in a Expo ejected project (Expo SDK 44, WatermelonDB 0.24.0). When I try to build de project (eas build), I get those erros:
[RUN_FASTLANE] › Compiling react-native-svg Pods/RNSVG » RNSVGMarker.m
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED…

letincho5
- 25
- 5
1
vote
1 answer
Build problems in a WatermelonDB + Expo ejected project
I'm working in a Expo ejected project (Expo SDK 44, WatermelonDB 0.24.0). When I try to build de project, I get those erros:
[RUN_FASTLANE]
❌ (node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/DatabaseBridge.swift:7:23)
5 | typealias…

letincho5
- 25
- 5
1
vote
2 answers
Fetch all records from WatermelonDB database
I would like to know why is the following block of code is returning the whole database object?
const getChatListFromDatabase = async () => {
try {
const chatList = await database.collections
.get("chatList")
.query()
…

Darshan
- 21
- 6
1
vote
0 answers
RecordId was sent over the bridge, but it's not cached in watermelondb
While working on sync api implementation, data was not getting synced with the backend server. As I debug the issue using react-native log-android for android apk it is giving the below error:
{ [Diagnostic error: Record ID…

Preeti Sharma
- 112
- 14
0
votes
0 answers
How to access the ranch_owner object from watermelondb object
i have this object I want to get address inside ranch_owner , i am using watermelondb there must a way or function i can access the relational data like this but not working , i read the documentation but didn't found anything helpful.

web pakistan
- 444
- 1
- 4
- 16