For example, there is the User entity (we will omit the getters and setters):
class User { private $id; private $email; private $phone; private $status; private $name; private $surname; private $avatar; private $visit_at; Sometimes entities are very large, and in specific cases, let's say quite a bit of data is not needed. For example, a User entity may have many properties, including a profile, access permissions, and so on. However, essentially only a full name or only a part of the data may be required.
From here it makes no sense to make a heavy request and fill the whole entity only to display the user name. Therefore, I can make a request of the form:
SELECT id,name,surname FROM users .... Therefore, the question arises: is it correct to fill in an entity not entirely, but only with necessary data, or do you need to create such mini entities for all occasions?