Skip to content

How to avoid TO_CHAR(date, format) being interpreted as join? #115

@brachetti

Description

@brachetti

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions