Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Use parent newQuery to get a Builder object. #245

Closed
wants to merge 2 commits into from
Closed

Use parent newQuery to get a Builder object. #245

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 23, 2014

This solves an issue where global scopes were not being applied.
I guess in theory it also solves other issues which are fixed upstreams in Eloquent but this is the one I know of for now.

@ghost
Copy link
Author

ghost commented Oct 23, 2014

Maybe it should be fixed in newBaseQueryBuilder instead? What's the difference between newBaseQueryBuilder and parent::newQuery()?

@ghost ghost mentioned this pull request Oct 23, 2014
@warksit
Copy link
Contributor

warksit commented Nov 13, 2014

Solves for me too.

@igorsantos07
Copy link
Member

Part of this seems related to #227, but you tackle the issue through a different approach.

However, this seems to change the way some Ardent methods works - since it will aparrently stop using Ardent\Builder. We should take a look at what would change, or maybe adapt code to keep using the original class.

@@ -893,11 +893,6 @@ public function newQuery($excludeDeleted = true) {
// while it is constructing and executing various queries against it.
$builder->setModel($this)->with($this->with);

if ($excludeDeleted and $this->softDelete)
Copy link
Member

Choose a reason for hiding this comment

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

related to #227?

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

Successfully merging this pull request may close these issues.

3 participants