-
- Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
Describe the bug
Model::getRelated() does not reuse already fetched relations that are populated in Model::related and Model::dirtyRelated.
getRelated always fetches fresh relations.
This makes requests slower and the Database heavier, normally there is no advantage by doing this, it only makes the request longer and the probability of a changed row while executing the request to happen, this is already almost impossible with the expected time of a request to be in the milliseconds.
Expected behavior
By default getRelated should reuse the relations in these arrays if not instructed otherwise.
Modell has refresh() to update the current model instance, ResultSet does not have this ability yet.
yahveh