-
Notifications
You must be signed in to change notification settings - Fork 55
fix: Apply left outer join to retrieve optional associations [WIP] #105
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
============================================
+ Coverage 65.73% 65.83% +0.09%
- Complexity 366 369 +3
============================================
Files 37 37
Lines 2014 2014
Branches 296 296
============================================
+ Hits 1324 1326 +2
Misses 562 562
+ Partials 128 126 -2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 66.42% 67% +0.58%
- Complexity 383 400 +17
==========================================
Files 34 33 -1
Lines 2031 2061 +30
Branches 301 304 +3
==========================================
+ Hits 1349 1381 +32
- Misses 552 555 +3
+ Partials 130 125 -5
Continue to review full report at Codecov.
|
5a1c0b5
to
c0cc4d0
Compare
Thanks for this! We've been running against this branch for a few days, the fix works as expected and we haven't noticed any unexpected side effects. |
@molexx Thank you for checking. I will refactor and apply optional association fetching after merging PR to support nested associations in where criteria expressions. |
c0cc4d0
to
148e129
Compare
b51638b
to
08131be
Compare
08131be
to
1c72160
Compare
1c72160
to
bd4427a
Compare
Thanks! :-) |
I don't think this is working properly in the merge to master. I've had difficulty proving when it broke because the branch this was on is now deleted and I've not had much success trying to pull builds for commits noted above from jitpack. I'll continue to investigate tomorrow... |
Our project works in the old build from that branch but does not work with 0.3.25, yet doing a similar query with the starwars schema using the example project works fine with master. @igdianov are there any changes to this outer join functionality between the branch and master? Did you implement the |
@molexx I had restored I have made the changes only to apply left outer join for |
@molexx Let me know what you find. Thank you |
@igdianov thanks for restoring the branches!
The parent entity contains a |
@molexx I need to understand the full context of query to be able to find the solution. The changes that work for you use outer join for all associations, but it is not a good practice for performance reasons. Let me know more details... |
This PR fixes #101
Given optional to-one association, i.e.
favoriteDroid
:The GraphQL schema will generate
optional
argument with default value derived from JPA's optional attribute value definition.The JPQL query will now apply left outer join to all queries against entity graph with optional associations, i.e. given the following query
And return all records with optional
favoriteDroid
association null valueIt will possible to override
optional
strategy with explicit value, i.e.Will return the following result: