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

Relation with withTrashed() break after version 5.7.22 #27357

Closed
martingautier opened this issue Jan 30, 2019 · 2 comments
Closed

Relation with withTrashed() break after version 5.7.22 #27357

martingautier opened this issue Jan 30, 2019 · 2 comments

Comments

@martingautier
Copy link

  • Laravel Version: 5.7.22
  • PHP Version: 7.1.9

Description:

I have a simple relation :
public function user() { return $this->belongsTo(User::class, 'user_id')->withTrashed(); }

It works on laravel version 5.7.22, but from 5.7.23 I have this error :

"Property [relationClauses] does not exist on the Eloquent builder instance."

Thanks for your feedback.

@erikgaal
Copy link
Contributor

erikgaal commented Jan 30, 2019

Can you post the stack trace please? This could be related to #27281, but I don't see the use of relationClauses in core, so this might be a—previously silently—failing property access in your own code.

@martingautier
Copy link
Author

I'm sorry but I made a mistake. This error comes from another package who overrides my relations (fico7489/laravel-eloquent-join).
This package no longer works with version 5.7.23.
For informations, it performs the following code:
$this->getQuery()->relationClauses[] = [$method => $parameters];

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

No branches or pull requests

2 participants