Print SQL query of ORM query builder in cakephp3
<p>How to print ORM query </p>

<pre><code>$query = $articles-&gt;find('all')-&gt;contain(['Comments']);
</code></pre>

<p>For example print => </p>

<pre><code>SELECT * FROM comments WHERE article_id IN (comments);
</code></pre>