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
{{ message }}
This repository has been archived by the owner on Jan 26, 2018. It is now read-only.
In jheathco/kohana-orm/blob/master/classes/kohana/orm.php#L852 $this->_loaded is set to TRUE, but is the data actually loaded from the database at this point? That is, if the server runs stored procedures etc. on the data would these changes be loaded back in to the model, or are you assuming that the data set on the model is the data that was saved to the database?
My point is $model->_loaded and $model->_saved should be independent, $model->save() should only set _saved to TRUE and then _loaded only if the data is selected again.
The text was updated successfully, but these errors were encountered:
Yeah, in my mind $loaded says 'this is data loaded directly from the database and is a true representation of that data'. As soon as you make changes to that data it is not longer true data loaded from the database, even when you save it from the object it is not "loaded" data, for as I said, the database could run other procedures on it. Does that make sense?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In jheathco/kohana-orm/blob/master/classes/kohana/orm.php#L852 $this->_loaded is set to TRUE, but is the data actually loaded from the database at this point? That is, if the server runs stored procedures etc. on the data would these changes be loaded back in to the model, or are you assuming that the data set on the model is the data that was saved to the database?
My point is $model->_loaded and $model->_saved should be independent, $model->save() should only set _saved to TRUE and then _loaded only if the data is selected again.
The text was updated successfully, but these errors were encountered: