This code:
$user = User::findFirst(
[
'email=:email:',
'bind' => [
':email' => $email
],
'columns' => 'id, password'
]
);
Produces this query:
SELECT `users`.`id` AS `id`, `users`.`password` AS `password` FROM `users` WHERE `users`.`email` = :email LIMIT :2
Why it adds the table name and "AS" for every column? It's supposed to work like that or i need to modify something in the model or configuration?
The model is very basic since i'm just starting out.
class User extends \Phalcon\Mvc\Model
{
public $id;
public $email;
public function getSource()
{
return "users";
}
}
Thank you