Start your All-Access Pass to unlock this challenge
Why is it beneficial to encapsulate logic for updating fields (like arrivedAt and status) into a method within the Starship entity?
arrivedAt
status
Starship
It centralizes the logic, improving reusability and maintainability.
It helps track changes in the entity by Doctrine.
It allows the use of direct SQL queries instead of Doctrine.
It eliminates the need to call flush().
flush()