Hook_views_query_alter: adding condition with entity reference value
This comment save my life!
https://api.drupal.org/comment/49458#comment-49458


  Be careful to add the table, even if You added the field in the view
  UI :


I added         

$view-&gt;query-&gt;add_table("field_data_field_installatori_reference");


and then I could access to my field:

$view-&gt;query-&gt;add_where(1, "field_data_field_installatori_reference.field_installatori_reference_target_id", $user-&gt;uid, '!=');