You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced a regression in the latest 1.0.0-RC6. I don't yet have a fully tested self contained example though.
But I think it boils down to this code:
caseclassFoo(a: Int, b: String)
caseclassBar(c: Int, d: Option[String])
sql"SELECT a, b, c, d FROM foo LEFT JOIN bar ON a = c".query[(Foo, Option[Bar])]
With these records in the DB:
| a | b |
-------------
| 1 | 'abc' |
| c | d |
------------
| 1 | NULL |
I used to get (Foo(1, "abc"), Some(Bar(1, None))) as the result of that query, and now I get (Foo(1, "abc"), None).
The text was updated successfully, but these errors were encountered:
Thanks for the report. I believe this is a long running issue in doobie and should be fixed by #2136.
See the changes I made for the test scenario "Read should read correct columns for instances with Option (None)" in ReadSuite.scala. I believe in RC5 the behaviour works for your case but not in the general case.
I'll add more tests to verify that left joining a table with not-null and null columns are handled correctly.
I experienced a regression in the latest 1.0.0-RC6. I don't yet have a fully tested self contained example though.
But I think it boils down to this code:
With these records in the DB:
I used to get
(Foo(1, "abc"), Some(Bar(1, None)))
as the result of that query, and now I get(Foo(1, "abc"), None)
.The text was updated successfully, but these errors were encountered: