I have table of my entity with structure:
===================================== eid | myfield1 | myfield2 | myfield3 =====================================
And also an additional table with primary key being foreign key to my entity id:
========================== eid | myfield4 | myfield5 ==========================
I would like to expose values in my second table to view of fields, of my entity, but I don't want to join second table with first, every time, but only if I will use one of its fields.
I believe it should be doable with views_join class modifying a query at handler level, but is it possible on hook_views_data_alter() level?
Is it possible to do this transparently - so I wouldn't need to add any relationship to view (just like the field values are pulled from fields tables - yes, you can think a bit about it as about creating fields alternative ;) ) ?