M
M
McMike2018-04-04 12:45:23
Yii
McMike, 2018-04-04 12:45:23

Is dirtyattributes checked automatically?

Do I need to check for dirty attributes before building the model? If there are no changes, then we do nothing, if there are, then we save. Is this checked automatically before saving, or even if the attributes are not changed, will there be a request to the database to re-save the same data?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2018-04-04
@McMike

Check in the debug panel, it's easy to do.
But as far as I know, this is automated (but did not check with pens).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question