Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot create property 'updatedAt' on string '415'

I have an issue on update record while updating while 415 is id.

Cannot create property 'updatedAt' on string '415'

I also add update field in model but still getting error

like image 277
Developer Avatar asked May 16 '26 17:05

Developer


1 Answers

In my case, it was my mistake on passing parameter (using es6).

db.Model.update(value)

The correct syntax have to be:

db.Model.update({value})
like image 77
taynguyen Avatar answered May 19 '26 06:05

taynguyen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!