🇲🇽Mexico preciado04 Tepic
¿Quedó en YouTube esta charla?
🇲🇽Mexico preciado04 Tepic
Is this an manageable option, on patch #4?
🇲🇽Mexico preciado04 Tepic
Comment #13 🐛 Duplicate nodes when using Views relationships Closed: duplicate worked for me.
The only detail is, I had to modify a little bit the query.
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\query\QueryPluginBase;
/**
* Implements hook_views_query_alter().
*/
function mymodule_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
switch($view->storage->id()){
case 'my_view_id';
$query->addField('node', 'nid', '', ['function' => 'groupby']);
$query->addGroupBy('node.nid');
break;
}
}