0
我只有一个基表具有自定义实体,并且它的节点及其字段field_a被引用。现在我想创建这两个实体(节点和我的自定义实体)之间的关系。我可以得到结果工作,但我没有得到在视图字段部分列出的节点字段。与自定义实体和节点的视图关系
//基表的自定义实体是“clinical_trial_research_sites”
function clinical_trial_views_data_alter(&$data) {
$data['clinical_trial_research_sites']['node'] = array(
'title' => t('Clinical Trial'),
'help' => t('Field Reference Appear in Location Content type.'),
// Information of the referenced table!!
'relationship' => array(
'handler' => 'views_handler_relationship',
'label' => t('Location'),
'base' => 'field_data_field_site_comp_code', // node field table name
'base field' => 'field_site_comp_code_value', // field column name of node field
'relationship field' => 'site_comp_code', // This is referencing field in my custom entity
),
);
}
我能获得SQL工作,内部连接工作,但意见不上市节点的所有领域,因为我想要显示的一些来自节点的字段也是!!我想我错过了一些信息来表达这种观点,即关系不仅仅是现场表,而是整个节点!