Answer the question
In order to leave comments, you need to log in
Why get and update the entire model object when changing multiple fields?
I often see code like this:
id = params('id')
item = new Item(id)
item.somevalue = 'newValue'
item.save()
Answer the question
In order to leave comments, you need to log in
Because they are hostages of the ORM concept where work is carried out exclusively with objects https://ru.wikipedia.org/wiki/ORM and https://habrahabr.ru/post/237889/ i.e. the minimum category to sample is an object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question