What is the difference between these two as implemented on hook_views_data_alter()
? Why choose one over the other?
I did notice that in setting up a relationship
between mytable1
and users
tables, the Views UI gave me the option to add the mytable1.uid
field under the relationship section, that way allows me to add users
fields into the query.
What am I supposed to notice on the views-UI when I implement a join
on a table? My implementation is as follows:
mymodule_views_data_alter(&$data){ $data['mytable1']['table']['join']['users'] = array( 'left_field' => 'uid', 'field' => 'uid', ); }
I did this without a relationship setting, so I can observe the exclusive effect of each(join
vs relationship
)