views – Hook_views_query_alter: adding the condition with the entity reference value

I need to filter a table result based on the current user.

I've added this condition in my hook_views_query_alter

function my_module_views_query_alter (& $ view, & $ query) {
global user $;
if ($ view-> name == & # 39; preventivi && $ view-> current_display == & # 39; page_3 & # 39;)
{
// $ view-> query-> add_where (1, $ user-> uid, 33, & # 39; = & # 39;);
$ view-> query-> add_where (1, "field_data_field_installatori_reference.field_installatori_reference.target_id", $ user-> uid, & # 39 ;! = & # 39;);

// dpm ($ view);
// dpm ($ query);
}
}

but I can not find the correct value of target_id insert in the condition.
Any suggestion?