Add EntityMapper for SQLInsertClause.populate() - #5
Open
jojoldu wants to merge 6 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
eXsio
reviewed
Jul 19, 2020
Author
|
@eXsio |
Author
|
@eXsio Hello. A successful test case using EntityMapper added as PR was also added. Please confirm. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.