Because the key was not sufficient to unify the "same" joins.
I knew there must have been a reason behind it.
Anyway upgrade to v5 breaks some our grids under specific conditions (when joining the same table multiple times)
// Ublaboo\DataGrid
// sorting
$this->addColumnText('billingEntity', 'Billing Entity')
->setSortableCallback(function (DbalCollection $source, $order) {
$source->getQueryBuilder()
->joinLeft('company co', 'co.id = c.billing_entity_id')
->orderBy($order);
});
// filtering
this->addFilterMultiSelect('billingEntity', 'Billing Entity', $billingEntityCompanies)
->setCondition(function (DbalCollection $source, ArrayHash $values) {
// omitted code...
$source->getQueryBuilder()
->joinLeft('company co', 'co.id = c.billing_entity_id')
->andWhere($query, ...$params);
});
Originally posted by @mskocik in #724