You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm able to successfully create records but not able to update. Inspecting the query args I can see that the where data is correct and can also confirm that the record I'm trying to update matches the query.
I have a feeling it's the way I have this set up. Here's what I have. I've removed some of the obj properties to keep it pithy:
When I run addNewBlock a row is added to the table because I can see it there. When I run updateBlock it seems to delete the row because when i run list_all_blocks it returns an empty array.
Hi swampthang, When you call 'connect()' the database is initialized, table objects are created, etc. The way you have it set up right now each of the bottom functions is emptying the database before querying it! You should call 'connect()' only once after you e setup the models and views.
I'm on my phone right now so I can't test this but that should fix things. 🙂
I'm able to successfully create records but not able to update. Inspecting the query args I can see that the where data is correct and can also confirm that the record I'm trying to update matches the query.
I have a feeling it's the way I have this set up. Here's what I have. I've removed some of the obj properties to keep it pithy:
I'm adding screenshots of a session so you can see what's happening. Successfully ran addNewBlock - note the blockID value:
You can see that the result was success.
Then ran updateBlock. You can see here that the blockID is a match:
From the same update instance here's showing the args object:
Same instance showing the matching value for 'where':
Back in the updateBlock method showing the result that nothing was modified:
So, I'm sure I have everything out of place. Hoping you can tell me what I am I doing wrong.
The text was updated successfully, but these errors were encountered: