I added a field to the user content type called metro_id.

I am trying to display that field along with the user's name in a view. I expected to see a join in my view sql. Instead I see that everything is being selected from user table and a field has been added to the select clause: 'user' AS field_data_field_metro_id_user_entity_type

How is this working?

  • 2
    Views adds that field to every query so it has easy access to the base type that the results relate to, it's nothing to do with a join on a field table. If you've added a field then you should be seeing a JOIN, yes – Clive Dec 16 '14 at 14:58
  • If the user entity is being displayed as a rendered entity so your view isn't using fields, there won't be a join in the view SQL. The view will use its query to get the user IDs then load and render them separately. – Alfred Armstrong Dec 16 '14 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.