Skip to content

Add the possibility to add additional filters for relation #76

@sukhwinder33445

Description

@sukhwinder33445

There should be a method like Relation::additionalFilter() to join table.

Use case

In the partnerportal I join contracts to a customer. It would be nice to have an additional filter to join only non-archived contracts.

Example

Customer::createRelations(Relations $relations)
    {
        $relations
              ->hasMany('contract', Contract::class)
              ->additionalFilter('contract.archived', 0)
              ->setJoinType('LEFT');
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions