Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested filters #207

Closed
PhyberApex opened this issue Oct 10, 2018 · 4 comments
Closed

Nested filters #207

PhyberApex opened this issue Oct 10, 2018 · 4 comments

Comments

@PhyberApex
Copy link
Contributor

Hey,

sorry to bother you so much but this is something we came about a few times now. We have been using your library quite a lot and there were a few use cases where we needed to implement a filter on a nested attribute. We came up with our own filter query parameter like "customNestedFilter[address.street]=somestreet". But it would be nice to have this as an actual filter. Would you be open for PR for a nested filter with the "." to indicate nesting as it should not be allowed in a property anyways? As filtering is not really specified within the json-api specification we came up with the dot notation.

~Cheers

@joukevandermaas
Copy link
Owner

Are you saying you have a model like this:

class Address { string Street { get; set; } }
class Person { Address Address { get; set; } }

And you want to filter on the street name? If so, I like the dot notation and I would be all for it. It would make Saule filtering a lot more powerful.

@PhyberApex
Copy link
Contributor Author

Exactly what I am talking about! Good to know you are open for it. I will take a look at this after the multiple filter PR. After which I hopefully have a better understanding of the filtering process, making this one easier to do :)

~Cheers

@PhyberApex
Copy link
Contributor Author

Got this working but I did use the multiple strings PR as code base by accident so I will open this PR after the other one is 100% through.

@PhyberApex
Copy link
Contributor Author

PR is open (#209) and up for review. I will close this as soon as the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants