Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Grid/Source/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
use APY\DataGridBundle\Grid\Column\JoinColumn;
use APY\DataGridBundle\Grid\Row;
use APY\DataGridBundle\Grid\Rows;
use Doctrine\ORM\Mapping\ReflectionEmbeddedProperty;
use Doctrine\ORM\NoResultException;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\Query\ResultSetMapping;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\Tools\Pagination\CountWalker;
use Doctrine\ORM\Tools\Pagination\Paginator;
use Symfony\Component\HttpKernel\Kernel;
Expand Down Expand Up @@ -202,6 +203,13 @@ protected function getFieldName($column, $withAlias = false)
return $column->getField();
}

$reflectionFields = $this->ormMetadata->getReflectionProperties();
$reflectionProperty = (isset($reflFields[$name])) ? $reflectionFields[$name] : null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello what is this variable $reflFields ? should it be $reflectionFields ?


if ($reflectionProperty instanceof ReflectionEmbeddedProperty) {
return $this->getTableAlias() . '.' . $name;
}

if (strpos($name, '.') !== false) {
$previousParent = '';

Expand Down