question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am unable to update a record

See original GitHub issue

I am testing the use of watermelonDb in React-native.

I created a simple code and was able to insert and delete a record. However, I can’t update. When I look at the record, the change was not performed

Code Update

async upTest(){
    const database = await getDataBase();
    const usersCollection = await database.get('users')
     await database.action(async () => {
      const usr = await usersCollection.find('u4m31hub33v9128q')
      await usr.update(usr => {
        usr.name = 'TTTT'  
      })
     
    })
   
   const usr2 = await usersCollection.find('u4m31hub33v9128q')
   console.log('Not Changed: ',usr2);
  }

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
0x7Ancommented, Apr 6, 2021

@santanna106 Nevermind, the code i’ve posted above works correctly,.

Inside a database action, you will always need a try/catch.

0reactions
stale[bot]commented, Apr 16, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FRM-40509: Unable to UPDATE record Tips
FRM-40509: ORACLE error: unable to UPDATE record. Cause: A fatal error occurred while trying to update a record. The table associated with the...
Read more >
FRM-40509: ORACLE error : Unable to update the record.
Hi, I am having the following code in delete button. declare v_button NUMBER; begin IF :CHNG_CNTRL_JOB_DTLS.SENT_DATE IS NULL THEN v_button ...
Read more >
ORA-40509 Oracle Error - Unable to Update Record
The WHEN-RADIO- CHANGED trigger will insert the optional record, toggle between both records, and update the mandatory record. But when I try to...
Read more >
FRM-40509 :Oracle error :unable to update record
Oracle Forms I'm very new to oracle forms. This error message is displayed FRM-40509 :Oracle error :unable to update record whenever i make...
Read more >
Unable to update record. Getting error "Write operation ...
Resolution · Find the table mentioned in the error message (<table_name>) and open the record. · Under the section "Application Access", check the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found