ClassMetadata does not have getValue so this is the only way.