laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

Unable to fetch relationships withThrashed

Open galzetta opened this issue 1 year ago • 0 comments

Description:

withThrashed doesn't work at all.

Steps to reproduce

  1. Define an entity relationship like so:
    public function something()
        {
            return $this->belongsTo(Something::class)->withThrashed();
        }
    
  2. Call this method

Expected behaviour

The results are returned and they include thrashed objects.

Actual behaviour

An exception is raised:

BadMethodCallException in Builder.php line 2450: Call to undefined method Jenssegers\Mongodb\Query\Builder::withThrashed()

galzetta avatar Jul 21 '22 09:07 galzetta