I'm using Cakephp 3.2.7 as a framework and create a query with select alias.
$posts = $this->Posts->find()
->select(['id' => 'Posts.id','userid'=>"Posts.user_id"])->toArray();
I want to get id as string not integer (the column type in mysql is integer) and get the userid as integer (the column type in mysql is also integer) but use alias convert it to string.
Is there any way to fetch all of Id columns in all of model as string or at least can define data type in query?