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

JPASQL: mapping of enums throws "illegal argument type" when mapping string from DB to setter for corresponding enum on DTO #575

Closed
Lindenmann opened this issue Nov 28, 2013 · 2 comments
Milestone

Comments

@Lindenmann
Copy link

@Lindenmann Lindenmann commented Nov 28, 2013

When using the metadata generated from apt-maven-plugin in JPASQLQueries, then enum columns defined as text in the DB are not projectable into a DTO property for this enum.

A more exhaustive description may be found on stackoverflow:

http://stackoverflow.com/questions/20263277/querydsl-illegal-argument-type-when-projecting-enum-from-jpasqlquery-into-dto

timowest added a commit that referenced this issue Nov 29, 2013
@timowest
Copy link
Member

@timowest timowest commented Nov 29, 2013

Could you try again with the latest SNAPSHOT from here https://oss.sonatype.org/content/repositories/snapshots

In general Querydsl SQL is a safer choice for SQL queries, since Querydsl has then full control of the result mapping, for Querydsl JPA native queries it is result post processing, which is not as clean.

You can use Querydsl SQL within JPA if you can access to the underlying JDBC connection.

@timowest
Copy link
Member

@timowest timowest commented Dec 12, 2013

Released in 3.3.0.BETA2

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

Successfully merging a pull request may close this issue.

None yet
2 participants