APYDataGridBundle icon indicating copy to clipboard operation
APYDataGridBundle copied to clipboard

Attempted to call an undefined method named "getSQLResultCasing"

Open marcelostrappini opened this issue 2 years ago • 1 comments

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:

  • Symfony: 5.4.7
  • apy/datagrid-bundle: "^4.0",

marcelostrappini avatar Apr 14 '22 14:04 marcelostrappini

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

FredDut avatar Aug 10 '22 14:08 FredDut

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

npotier avatar Feb 11 '23 01:02 npotier