this will break for Doctrine because your user could be a proxy object and so not be of the same class