"Is there the way to make the object that only holds the required values?"
For example, Getting only one user record. Like this,
$user = Users::findFirstById(3); echo "<pre>"; var_dump($user); echo "</pre>";
When dump this object,Many values are printed.
This object is holding many values, (even Other object values and SQL)
It seems to have all the referenced values that was seleted on current page .
Sometimes, I met the error by memory_limit over This error's reason is object hold many values?
(This error generated on aws ec2. Not generated on windows10 xampp.)