Skip to content

Conversation

@hagen00
Copy link
Contributor

@hagen00 hagen00 commented Jul 18, 2017

Previous pull request was misleading. Keeping the docs to make passing conditions obvious, but refactoring to encourage better code. #5102 (comment)

references: #5102 (comment) and cakephp/cakephp#10919

Previous pull request was misleading. Keeping the docs as is to make it obvious, but refactoring to encourage better code. cakephp#5102 (comment)
@saeideng
Copy link
Member

saeideng commented Jul 18, 2017

you can use one of these

       ->find()
       ->where(['name LIKE' => '%Foo%'])
       ->find('children', ['for' => 1]);

OR

       ->find()
       ->find('children', ['for' => 1])
       ->where(['name LIKE' => '%Foo%'])

OR

       ->find('children', ['for' => 1])
       ->where(['name LIKE' => '%Foo%'])

@hagen00
Copy link
Contributor Author

hagen00 commented Jul 18, 2017

@saeideng do you think necessary to specify all those three ways of doing it? The last one seems best to me. The first two shouldn't really be necessary. (the first two are both the same. If anything, we can pick one of those + the last one)

@saeideng
Copy link
Member

do you think necessary to specify all those three ways of doing it?

no
for this last code is better

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

Successfully merging this pull request may close these issues.

5 participants