Column:BIND_PARAM_INT still a string

Phalcon version 2.0.9.

Code:

<?php
                $user = Users::findFirst(
                    [
                        'columns'    => ['user_id'],
                        'conditions' => 'user_id = :user_id:',
                        'bind'       => ['user_id' => 7],
                        'bindTypes'  => [Column::BIND_PARAM_INT],
                    ]
                );

Gives this SQL:

SELECT `T_USERS`.`user_id` AS `user_id` FROM `T_USERS` WHERE `T_USERS`.`user_id` = '7' LIMIT 1

which is wrong, it should be (number 7, not string 7):

SELECT `T_USERS`.`user_id` AS `user_id` FROM `T_USERS` WHERE `T_USERS`.`user_id` = 7 LIMIT 1

What am I doing wrong? user_id is correct data_type in the database (int).

edited Feb '16

Try:

'bindTypes' => [
    'user_id' => Column::BIND_PARAM_INT
]


6.6k

Unfortunately, I tried that, but it's not working.

Anyone who uses BIND_PARAM_INT can confirm their sql code is correct (binding to int, not string)?