谢谢。
用这个试试
$query->where('n.language NOT IN (SELECT language FROM languages WHERE language = :lang)',array(':lang' => $value));