Entity Query from comment not working I tried using entityquery for comment by nid but its not working here is my code :

$query = new EntityFieldQuery();
    $query-&gt;entityCondition('entity_type', 'comment')
    -&gt;entityCondition('entity_id', 257, '=')
    -&gt;addMetaData('account', user_load(1));


and also I tried changing to nid but still its showing all the comments instead of by specific nid:

$query = new EntityFieldQuery();
    $query-&gt;entityCondition('entity_type', 'comment')
    -&gt;entityCondition('nid', 257, '=')
    -&gt;addMetaData('account', user_load(1));


can someone tell me I am doing anything wrong?

thank you
nid is a property of the comment entity, so try:

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'comment')
    -&gt;propertyCondition('nid', 257)
    -&gt;addMetaData('account', user_load(1));