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
Both query[Person] and dynamicQuery[Person] generate identical SQL.
Actual behavior
println(run { query[Person] }.string)
// correct, Quill respects the decoder// SELECT x.id, x.name FROM person x
println(run { dynamicQuery[Person] }.string)
// incorrect, Quill includes the fields of the embedded class, ignoring the defined decoder// SELECT x.id, x.first_name AS firstName, x.last_name AS lastName FROM person x
It looks like #2607 breaks SQL generation in dynamic queries, because now dynamic queries ignore any decoders defined for embedded classes.
Version: 4.6.0
Module: quill-sql, quill-jdbc
Here is a simple example:
Expected behavior
Both
query[Person]
anddynamicQuery[Person]
generate identical SQL.Actual behavior
Steps to reproduce the behavior
Scastie snippet: https://scastie.scala-lang.org/UqW82jVTQuuyNR2McIKnzA
Unfortunately, I couldn't make Scastie work with dynamic queries (some strange class loader error in runtime), so, in case it helps, here's a simple github project that shows the same issue: https://github.com/lpld/quill-embedded-bug/blob/master/src/main/scala/example/Hello.scala
Workaround
No workaround that I could find.
@getquill/maintainers
The text was updated successfully, but these errors were encountered: