Skip to content

Filter Relationship MorphTo, HasOne... #88

@alansgonzaga

Description

@alansgonzaga

Sorry if I shouldn't open a new issue, don't know how works but I couldn't reopen #23 issue that I guess is "same problem"

I'm struggling with some relationship filters. In short, I'm having trouble filtering relationships (One to Many (Polymorphic) [morphTo]). I did a lot of debugging of the SQL query that was being executed and I saw that the morphTo relationship was never used. So I came here to look for issues, and I believe it seems to be related to #23 issue. I saw that they said that the HasOne relationship is also not recognized. Since they said that this would be fixed in the future, I did some tests here with a HasOne, but I don't think it works yet, right?

I refactored my production environment to use purity filters, and I'd like to take this opportunity to say that the package is amazing. Unfortunately, I didn't notice that this type of relationship stopped working. It used to work with my old strategy (https://github.com/savannabits/primevue-datatables).

I've tried with and without filling in the $filterFields, I've also made sure that all relationships have the return type filled in, and the Models use the Filterable trait.

I'd like to check if I'm doing something wrong or if it really is a current limitation?
image
image
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions