APY / APYDataGridBundle

Symfony Datagrid Bundle
MIT License
492 stars 344 forks source link

Attempted to call an undefined method named "getSQLResultCasing" #1073

Closed marcelostrappini closed 1 year ago

marcelostrappini commented 2 years ago

Apparently the method was removed from the ORM

HTTP 500 Internal Server Error
Attempted to call an undefined method named "getSQLResultCasing" of class "Doctrine\DBAL\Platforms\MariaDb1027Platform".
// My Controller
public function index(
    Request $request,
    OrderRepository $orderRepository,
    OrderGrid $orderGrid
    ) {
    $grid = $orderGrid->getSales($orderRepository->findAllQuery(), $this->getUser());
    $template = $request->isXmlHttpRequest() ?
            'backend/grid.html.twig' :
            'backend_dashboard/index.html.twig';

    return $grid->getGridResponse($template);
}
// OrderGrid service

/**
 * @var \APY\DataGridBundle\Grid\Grid
 */
private $grid;

/**
 * Construct method.
 */
public function __construct(Grid $grid)
{
    $this->grid = $grid;
}

public function getSales(QueryBuilder $queryBuilder, User $user)
{
    $grid = $this->grid;
    $source = new Entity('App:Order');
    $source->manipulateQuery($queryBuilder);

    $grid->setSource($source);

    /**
    * Rest of configuration ...
    */

    return $grid;
}

Another information:

FredDut commented 2 years ago

Hello. I've proposed this https://github.com/APY/APYDataGridBundle/commit/ee764746a79c40b700d65e3dd80b70d1677ab733 #

npotier commented 1 year ago

Solved with https://github.com/APY/APYDataGridBundle/pull/1080