Exception:Call to a member function getId() on null

Error ID: 0