We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Keyword Group in ORM Find Query

I'm not certain this is a bug, yet I'm getting the following error:

Scanning error before 'group` = :group:...' when parsing: SELECT [UserSetting].* FROM [UserSetting] WHERE user_id = :user_id: AND `group` = :group: (89)
    $setting = \UserSetting::find([
            "user_id = :user_id: AND `group` = :group:",
            "bind" => [
                "user_id" => $this->session->get('id'),
                "group" => 'email'
            ]
        ]);

I have a table for settings where I have these columns (Three reserved keywords that should be safe by backticks):

id, user_id, group, key, value

Anyone have any Advice?



98.9k
Accepted
answer