Grid/Source/Document.php
protected function addReferencedFields(Row $row, $resource)
    {
        foreach ($this->referencedColumns as $parent => $subColumns) {
            $node = $this->getClassProperties($resource);
            if (isset($node[strtolower($parent)])) {
                $node = $node[strtolower($parent)];

                foreach ($subColumns as $field) {
                    $getter = 'get' . ucfirst($field);
                    if (method_exists($node, $getter)) {
                        $row->setField($parent . '.' . $field, $node->$getter());
                    } else {
                        throw new \Exception(sprintf('Method %s for Document %s not exists', $getter, $this->referencedMappings[$parent]));
                    }
                }
            }
        }

        return $row;
    }
protected function addReferencedFields(Row $row, $resource)
    {
        foreach ($this->referencedColumns as $parent => $subColumns) {
            $node = $this->getClassProperties($resource);
            if (isset($node[strtolower($parent)])) {
                $node = $node[strtolower($parent)];

                foreach ($subColumns as $field) {
                    $getter = 'get' . ucfirst($field);
                    if (method_exists($node, $getter)) {
                        $row->setField($parent . '.' . $field, $node->$getter());
                    } else {
                        throw new \Exception(sprintf('Method %s for Document %s not exists', $getter, $this->referencedMappings[$parent]));
                    }
                }
            }
        }

        return $row;
    }
@param \APY\DataGridBundle\Grid\Row $row
@param Document                     $resource

@throws \Exception if getter for field does not exists

@return \APY\DataGridBundle\Grid\Row $row with referenced fields