src/Datagrid/OrderByToSelectWalker.php
private function createSelectExpressionItem(PathExpression $pathExpression)
    {
        if (PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION === $pathExpression->type) {
            $identity = new IdentityFunction('identity');

            $identity->pathExpression = clone $pathExpression;

            return $identity;
        }

        return clone $pathExpression;
    }
private function createSelectExpressionItem(PathExpression $pathExpression)
    {
        if (PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION === $pathExpression->type) {
            $identity = new IdentityFunction('identity');

            $identity->pathExpression = clone $pathExpression;

            return $identity;
        }

        return clone $pathExpression;
    }
Retrieve either an IdentityFunction (IDENTITY(u.assoc)) or a state field (u.name).

@return IdentityFunction|PathExpression