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

Support for doing OR queries with find() and find_first() #10

Closed
GoogleCodeExporter opened this issue Jun 3, 2015 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

Ability to do an OR query with find() and find_first(), possibly by doing a
sub-array within the condition array.

Example: table_name::find(array('cond1' => true, array('cond2' => 1,
'cond3' => 2)));

Would produce: SELECT * FROM table_name WHERE cond1 = true AND (cond2 = 1
OR cond3 = 2);

Original issue reported on code.google.com by lorderunion on 2 Sep 2008 at 11:58

@GoogleCodeExporter
Copy link
Author

I think this needs some more thought, and maybe we should get some inspiration 
from
another framework that does query building.

Really, this kind of complex filtering condition calls for a 
business-requirements
specific ::find_by_X method that implements the OR logic, rather than support 
in the
framework.

Original comment by thwarted...@gmail.com on 10 Sep 2008 at 7:56

@GoogleCodeExporter
Copy link
Author

Decided against this. If you need to run OR queries, pass in a manual query 
into the
find*() methods to run.

Original comment by lorderunion on 20 Oct 2008 at 9:56

  • Changed state: WontFix

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

No branches or pull requests

1 participant