Skip to content

Add support polymorphic relations #3

@brussens

Description

@brussens

In 2.0, it is very upsetting that there are no polymorphic relations out of the box.
It would be cool to be able to use such relations.
It would be very nice to use something like this:

return $this->hasMany(Comment::class, ['entity_id' => 'id'])
    ->polyTo(['entity_type'], static::class);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions