I want to select DocumentFolder with it's parent , but no field in output (screenshot in attach)
$collection = $entityManager
->getRDBRepository('DocumentFolder')
->select([
'id',
'name',
'parentId',
'DocumentFolder1.id',
['DocumentFolder1.name', 'name1']
])
->join(
'DocumentFolder', // meeting_user table
'DocumentFolder1', // alias
[
'DocumentFolder1.id:' => 'parentId', // join condition
'deleted' => false, // important
],
)->find();
$newlistdata = $collection->getValueMapList();
How to add field in output ?
$collection = $entityManager
->getRDBRepository('DocumentFolder')
->select([
'id',
'name',
'parentId',
'DocumentFolder1.id',
['DocumentFolder1.name', 'name1']
])
->join(
'DocumentFolder', // meeting_user table
'DocumentFolder1', // alias
[
'DocumentFolder1.id:' => 'parentId', // join condition
'deleted' => false, // important
],
)->find();
$newlistdata = $collection->getValueMapList();
How to add field in output ?
Comment