I've been working through changes required to get our app upgraded from v3.4 to v4 and hit an issue this morning due to a column name in one of our tables being called notification_sent
. When I use the ::count()
method on the model and send a condition of notification_sent = 1
I get the following error:
Column 'ification_sent' doesn't belong to any of the selected models (1), when preparing...
It appears that the ORM is splitting the column name up, thinking the initial "not" is part of the SQL?
I've fixed this by wrapping the column name in quotations but I'm concerned because we have a bunch of tables all prefixed with notification_
and I don't know how the ORM will behave with them.
This wasn't a problem on v3.4 and the docs don't show the need to wrap column names in quotes, so I'm thinking this may be a bug.
I'm happy to open an Issue on Github but wanted to see if others had the same problem and if it could genuinely be a bug?
Stack:
- Phalcon v4.0.6
- PHP v7.4.11
- Ubuntu v20.04.1
- MySQL v8.0.21-0ubuntu0.20.04.4