Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I found a few duplicated blocks of code related to clearing query state when subqueries are created. Having a function will help prevent code getting out of sync in the future.
- Loading branch information
Showing
2 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13b224c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit seems to be breaking the following query in a controller:
$articles = $this->Articles->find()->where(['date' => $articleDate, 'Categories.title' => $catTitle]);
When
$articles->count()
is called the produced SQL doesn't include theCategories
table and fails.It was working up to this.
EDIT: The only difference between the old and new code is that the new one also clears containments.
13b224c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, do you have contained assoiations?