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

Issue with Enum datatype in querydsl #2364

Closed
prasannabalaraman opened this issue Feb 13, 2024 · 3 comments
Closed

Issue with Enum datatype in querydsl #2364

prasannabalaraman opened this issue Feb 13, 2024 · 3 comments

Comments

@prasannabalaraman
Copy link

prasannabalaraman commented Feb 13, 2024

I have an App entity class which has a enum field

@Enumerated(EnumType.STRING)
@Column(name = "platform", columnDefinition = "platform_enum")
private Platform platform;

My Platform enum is

public enum Platform {
ANDROID,
IOS;
}

I have created enum in postgres too
CREATE TYPE platform_enum AS ENUM (
'IOS',
'ANDROID');

My repo class is

public interface AppRepository extends PagingAndSortingRepository<App, UUID>, QuerydslPredicateExecutor

When I try to {{baseUrl}}/{{apiVersion}}/{{apiContext}}/apps?platform=IOS, I am getting the following exception

Caused by: java.lang.IllegalArgumentException: Parameter value [IOS] did not match expected type [Platform (n/a)]

I tried converting the column type as varchar in DB but that doesnt help.

Appreciate your help.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 13, 2024
@mp911de
Copy link
Member

mp911de commented Feb 20, 2024

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem.
You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Please include the full stack trace.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Feb 20, 2024
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Feb 27, 2024
@spring-projects-issues
Copy link

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Mar 5, 2024
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

3 participants