Problem with Views 7.x-3.0 – Column not found-Collection of common programming errors

I just updated the views from 7.x-3.0-rc1 to version 7.x-3.0 and now I’m getting the following error when executing my view:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_category.nid' in 'on clause'

The generated query looks like this:

SELECT node.title AS node_title, 
       node.nid AS nid, 
       node_field_data_field_category.title AS node_field_data_field_category_title,
      'node' AS field_data_field_color_node_entity_type, 
      'node' AS field_data_field_image_node_entity_type, 
      'node' AS field_data_field_sale_node_entity_type
FROM {node} node
LEFT JOIN {field_data_field_category} field_data_field_category ON node.nid = 
                                      field_data_field_category.entity_id AND 
                                      (field_data_field_category.entity_type = 'node' AND 
                                      field_data_field_category.deleted = '0')
LEFT JOIN {node} node_field_data_field_category ON field_data_field_category.nid = 
                 node_field_data_field_category.nid
LEFT JOIN {field_data_field_gender} field_data_field_gender ON node.nid = 
                                    field_data_field_gender.entity_id AND
                                    (field_data_field_gender.entity_type = 'node' AND
                                    field_data_field_gender.deleted = '0')
WHERE (((node.type IN  ('product')) AND (node.status = '1') AND
        (field_data_field_gender.field_gender_value IN  ('0', '1'))));

I see that the field_data_field_category.nid should be field_data_field_category.field_category_nid, but how do I solve this without using something like hook_query_alter?

Originally posted 2013-11-09 22:48:29.