-
Notifications
You must be signed in to change notification settings - Fork 17
Add EntityMapper for SQLInsertClause.populate() #5
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
============================================
- Coverage 92.76% 88.75% -4.01%
- Complexity 300 344 +44
============================================
Files 27 36 +9
Lines 677 907 +230
Branches 37 56 +19
============================================
+ Hits 628 805 +177
- Misses 36 83 +47
- Partials 13 19 +6
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, Thank you for the contribution!
Would you be so kind to provide an automated test that proves this code works and shows how to use it?
Please make sure that the overall code coverage is not decreased.
|
@eXsio |
|
@eXsio Hello. A successful test case using EntityMapper added as PR was also added. Please confirm. |
Hi @eXsio
QClass created with Entityql as below will fail when using
SQLInsertClause.populate().This is the insert query I intended,
Actually, it works like this:
The reason was that the property key and the column name were different, and there was an issue that could not be recognized.
In BeanMapper supported by Querydsl-sql, the property key and the column name had to match.
This problem is also recognized in Querydsl-sql, so AnnotationMapper is supported.
However, AnnotationMapper uses the @column annotation of querydsl, so it cannot be used in QClass created with Entityql.
So I created a Mapper class that uses JPA's @column annotation.
I changed the test code above to EntityMapper and it worked fine.
Below is a link to the code I tested.
link
I'll ask for confirmation.