Use Symfony\PropertyAccessor to set and get entity values.