Skip to content

Custom filters on BelongsToMany throws BadMethodCallException  #45

@dracon

Description

@dracon

"message": "Call to undefined method Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany::getQualifiedRelatedKeyName()", "exception": "BadMethodCallException", "file": "/var/www/bneapilocal/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php", "line": 50,

In EloquentBuilderTrait.php
In method joinRelatedModelIfExists
At line 299

Custom filters on BelongsToMany throws exception on the method call at line 299:
$relation->getQualifiedRelatedKeyName()
When I change it to:
$relation->getQualifiedRelatedPivotKeyName()

This works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions