Advanced configuration

By default, Doctrine options fetchJoinCollection and useOutputWalkers are enabled in all grids, but you can simply disable them with this config:

Yaml
config/packages/sylius_grid.yaml
sylius_grid:
    grids:
        foo:
            driver:
                options:
                    pagination:                
                        fetch_join_collection: false
                        use_output_walkers: false
PHP
config/packages/sylius_grid.php
<?php

use Sylius\Bundle\GridBundle\Builder\Field\StringField;
use Sylius\Bundle\GridBundle\Builder\GridBuilder;
use Sylius\Bundle\GridBundle\Config\GridConfig;

return static function (GridConfig $grid): void {
    $grid->addGrid(GridBuilder::create('app_user', '%app.model.user.class%')
        ->setDriverOption('pagination', [
            'fetch_join_collection' => false,
            'use_output_walkers' => false,
        ])
    )
};

These changes may be necessary when you work with huge databases.

Last updated