notorm
notorm copied to clipboard
How to avoid TO_CHAR(date, format) being interpreted as join?
I have a select like this
$risks->select("TO_CHAR(table.last_updated_date,'DD.MM.YYYY HH24:MI:SS') as SNAP")->fetch();
NotOrm now compiles this to
SELECT TO_CHAR(risks.LUD,'MM.YYYY MI.SS') as SNAP FROM risks LEFT JOIN DD ON risks.DD_id = DD.id LEFT JOIN MM ON DD.MM_id = MM.id LEFT JOIN HH24 ON risks.RISK_ID = HH24.RISKS_id LEFT JOIN MI ON HH24.id = MI.HH24_id WHERE (risks.RISK_ID = 12345)
How can I suppress this behaviour?