I have an entity that references node
and user
via nid
and uid
fields.
I have created an entity around my schema and would like to use it in views. I can create a view based on a new entity that shows fields from the entity.
Now I want to add relationships to node
and user
so I could pull fields from them. So I want to show fields from related user and node, not my entity bundles.
What's the right way to do this?
hook_view_data
is not the right place to define entity fields for views,EntityDefaultViewsController
should be used instead.