Replies: 2 comments 2 replies
-
{ debbug |
Beta Was this translation helpful? Give feedback.
-
@urishabh11 i found the mistake, i had a hook "beforeSave" than generate a uuid.. and that hook need to be "beforecreate" because is only for create. Thank you anyway!! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Package version:
"@adonisjs/lucid": "^6.1.3"
Node.js and npm version
node: v14.15.1
npm: v6.14.8
Sample Code:
I try to do this:
const user = await User.findByOrFail('email', email)
user.firstName = firstName
user.lastName = lastName
user.country = country
user.countryCode = countryCode
user.phoneNumber = phoneNumber
await user.save()
return user
im using pg for database, when execute this method dont update the row.
Plis help!
Beta Was this translation helpful? Give feedback.
All reactions