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

Filter cannot work with Expression columns #35

Closed
sukhwinder33445 opened this issue Aug 29, 2022 · 1 comment
Closed

Filter cannot work with Expression columns #35

sukhwinder33445 opened this issue Aug 29, 2022 · 1 comment

Comments

@sukhwinder33445
Copy link
Contributor

If a column has expression as value, Filter create wrong where clause.

Example:

Table news has a expression column sent. Filter creates the following query:

SELECT news.id,
       news.title,
       news.sent_on,
       (CASE WHEN news.sent_on IS NOT NULL THEN 1 ELSE 0 END) AS sent,
FROM news
WHERE news.sent = 1 // column sent does not exist here
ORDER BY news.sent_on DESC;

Additional:

Have a look at this Stack Overflow example

@sukhwinder33445
Copy link
Contributor Author

Issue: Icinga/ipl-orm#75

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