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

Add automap support for concrete classes #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cosmin-ionita
Copy link

@cosmin-ionita cosmin-ionita commented Apr 26, 2020

Hello, @davidmoten!

Thank you for your work on this project, it's very useful and it definitely helps a lot of developers.

I noticed that auto-map support for concrete classes was dropped on this project (comparing to rxjava-jdbc project), for the reasons you mentioned on issue #15, which I completely understand.

However, it is an important feature that is really needed, mostly for the ones who migrate from rxjava-jdbc, which need to update their models to be compatible with this new project.

In alignment to your expressed intention (in the above mentioned issue) to add back that functionality, I decided to take some time to explore the code and see if I can add it back on (and this PR is the result of that effort).

I mainly took the code from the rxjava-jdbc and I integrated it here, as best as I could, and I also added a small unit test to see if it works as expected.

Thank you and let me know what you think about it!

@codecov-io
Copy link

Codecov Report

Merging #53 into master will decrease coverage by 0.78%.
The diff coverage is 28.88%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
- Coverage     77.64%   76.86%   -0.79%     
- Complexity      669      675       +6     
============================================
  Files            73       73              
  Lines          2747     2792      +45     
  Branches        240      249       +9     
============================================
+ Hits           2133     2146      +13     
- Misses          508      540      +32     
  Partials        106      106              
Impacted Files Coverage Δ Complexity Δ
...dbc/src/main/java/org/davidmoten/rx/jdbc/Util.java 71.22% <28.88%> (-3.78%) 134.00 <6.00> (+6.00) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d707798...4443447. Read the comment docs.

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

Successfully merging this pull request may close these issues.

2 participants