Skip to content

Nested filtering on enum is broken #695

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

Closed
maurei opened this issue Feb 19, 2020 · 1 comment
Closed

Nested filtering on enum is broken #695

maurei opened this issue Feb 19, 2020 · 1 comment

Comments

@maurei
Copy link
Member

maurei commented Feb 19, 2020

Description

Consider the models:

public class Article : Identifiable
{
    [Attr] public SomeEnum SomeEnum { get; set; }
}

public class Author : Identifiable
{
    [HasMany] public List<Article> Articles { get; set; }
}

then, the following does not work:

http://localhost:5000/v1/authors?include=articles&filter[articles.someEnum]=1

Error:

"title": "ArgumentException",
"detail": "'SomeEnum' is not a member of type 'System.Collections.Generic.List`1[Rs.Services.Clients.Models.Author]' (Parameter 'propertyOrFieldName')",
"status": "500"

Note that, however, the following does work:

http://localhost:5000/v1/articles?filter[someEnum]=1
@maurei
Copy link
Member Author

maurei commented Feb 19, 2020

This is actually a duplicate of #627

@maurei maurei closed this as completed Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant