-
Notifications
You must be signed in to change notification settings - Fork 42
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
Is automapping to a concrete class gone? #15
Comments
Yeah I did leave it out intentionally mainly because of type safety. If your constructor changes then you get no compile time indication and the complication of multiple constructors made the approach a bit unattractive to me. Probably your easiest workaround is to use an intermediate Tuple: db.select("select name, score from person")
.getAs(String.class, Integer.class)
.map(x -> new Person(x._1, x._2)); |
I see, a pity. Working with tuples becomes cumbersome when the number of columns grows and you have to explicitly specify the type of each of them. Is it possible to reintroduce this functionality, possibly in some utility class? |
So I'll mark it as an enhancement and pop it on my backlog. The code can be copied from |
Much appreciated! |
@davidmoten I tried to fix this issue here: #53. Please let me know your thoughts! |
I've just migrated from rxjava-jdbc to rxjava2-jdbc and noticed that automapping to a concrete class feature is missing. That was a really useful tiny little thing. Can we hope it returns at some point?
The text was updated successfully, but these errors were encountered: