在奏鸣曲列表中,我想将以下联接分成多行而不是对id进行分组,最佳的设计是什么?
screenshot of the current display
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('id')
->add('subscriptionBillings')
->add('packPurchases')
->add('s.id') // Does not match the join, display the main entity id instead
;
}
public function createQuery($context = 'list')
{
$query = parent::createQuery();
$query->leftJoin($query->getRootAlias() . '.subscriptionBillings', 's');
$query->leftJoin($query->getRootAlias() . '.packPurchases', 'p');
return $query;
}
谢谢