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

Support enumeration fields #39

Open
drenda opened this issue Jun 28, 2019 · 1 comment
Open

Support enumeration fields #39

drenda opened this issue Jun 28, 2019 · 1 comment

Comments

@drenda
Copy link

drenda commented Jun 28, 2019

I'm using Spring Boot, Spring Data Rest and this library.
I followed this tutorial https://www.baeldung.com/rest-api-search-language-rsql-fiql and everything works fine.

I've a problem when a field is an enumeration. In this query:

http://localhost:8082/api/v1/contacts/search?query=type==CUSTOMER

type field is an enumeration defines as:

```

@NotNull
@Enumerated(EnumType.STRING)
@column(nullable = false, columnDefinition = "VARCHAR(30) DEFAULT 'CUSTOMER'")
private ContactType type = ContactType.CUSTOMER;


how am I supposed to make the filter work?

Thanks
@odemura
Copy link

odemura commented Apr 2, 2021

you could have added a stack trace.
we use tennaito/rsql-jpa and no problems with @Enumerated @Columns whatsoever,
and it does nothing special for them at all
https://github.com/tennaito/rsql-jpa/blob/master/src/main/java/com/github/tennaito/rsql/jpa/PredicateBuilder.java#L259
https://github.com/tennaito/rsql-jpa/blob/master/src/main/java/com/github/tennaito/rsql/jpa/PredicateBuilder.java#L390

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

No branches or pull requests

2 participants