Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
brachetti opened this issue Dec 22, 2015 · 0 comments
Open

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

brachetti opened this issue Dec 22, 2015 · 0 comments

Comments

@brachetti
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant