Cast value to integer in EntityType::convertToPHPValue to put in find method of entity.