Cakephp-3.x: How to change the data type of a selected alias?
<p>WHen i try to do :</p>

<pre><code>$fields = array('id' =&gt; 'custom_id', 'title' =&gt; 'some_name');
</code></pre>

<p>The result I get has <code>id</code> as a string.</p>

<p>If I do:</p>

<pre><code>$fields = array('custom_id', 'title' =&gt; 'some_name');
</code></pre>

<p>then it gives <code>custom_id</code> as integer.</p>

<p>How can I obtain <code>custom_id</code> as <code>id</code> without loosing the data type. I read the documentation but didn't found much help.</p>

<p>There is something that virtual fields can do I think. But is it possible inside the find query without the use of virtual fields etc?</p>

<p>Thanks in Advance</p>