You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently using v4.1.0, so I don't know, if this issue persists in newer versions.
I have some database models using a colum, for example notification_date. When querying database using
$result = Orders::find([
'conditions' => 'notification_date IS NULL',
]);
I get an error from Phalcon, saying (you can see, that Phalcon cuts off not):
"Column 'ification_date' doesn't belong to any of the selected models (1), when preparing: SELECT [App\\Models\\Orders].* FROM [App\\Models\\Orders] WHERE notification_date IS NULL"
Even when using backticks in conditions `notification_date` I'm getting another error:
"Scanning error before 'notification_date...' when parsing: SELECT [App\\Models\\Orders].* FROM [App\\Models\\Orders] WHERE `notification_date` IS NULL"
The only solution is to rename column to anything not starting with not.
The text was updated successfully, but these errors were encountered:
I'm only aware of the backticks used by MySQL, so I'm wondering about the square brackets. So this is a Phalcon specific thing?
BTW: I understand that keywords like NOT, LIKE and UPDATE have to be escaped. Nevertheless, Phalcon (i.e. PHQL) seems to ignore word boundaries, because an error on using notification_date is nothing I would expect.
Currently using v4.1.0, so I don't know, if this issue persists in newer versions.
I have some database models using a colum, for example
notification_date
. When querying database usingI get an error from Phalcon, saying (you can see, that Phalcon cuts off
not
):Even when using backticks in conditions
`notification_date`
I'm getting another error:The only solution is to rename column to anything not starting with
not
.The text was updated successfully, but these errors were encountered: