Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Pachyderm/Orm/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ private function addWhere($globalOperator, $field, $operator, $value)
}

if ($field instanceof QueryBuilder) {
if (empty($field->build())) return $this;
$this->append($globalOperator, $field->build());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you build twice?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

return $this;
}
Expand Down