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
valctx=newSqlMirrorContext(PostgresDialect, UpperCase)
importctx._caseclassTestEntity(s: String, i: Int, l: Long, o: Option[Int]) extendsEmbeddedcaseclassDual(ta: TestEntity, tb: TestEntity)
valqr1= quote {
query[TestEntity]
}
valq= quote {
qr1.join(qr1).on((a, b) => a.i == b.i).nested.map(both => both match { case (a, b) =>Dual(a, b) }).nested
}
println(run(q).string)
Actual behavior
The following exception happens:
cmd7.sc:1: exception during macro expansion:
java.lang.IndexOutOfBoundsException: 1
at scala.collection.LinearSeqOptimized$class.apply(LinearSeqOptimized.scala:65)
at scala.collection.immutable.List.apply(List.scala:84)
at io.getquill.context.sql.norm.ExpandNestedQueries$.io$getquill$context$sql$norm$ExpandNestedQueries$$expandReference$1(ExpandNestedQueries.scala:90)
at io.getquill.context.sql.norm.ExpandNestedQueries$.io$getquill$context$sql$norm$ExpandNestedQueries$$expandReference$1(ExpandNestedQueries.scala:80)
at io.getquill.context.sql.norm.ExpandNestedQueries$$anonfun$expandSelect$1.apply(ExpandNestedQueries.scala:108)
at io.getquill.context.sql.norm.ExpandNestedQueries$$anonfun$expandSelect$1.apply(ExpandNestedQueries.scala:108)
at scala.collection.immutable.List.map(List.scala:288)
at io.getquill.context.sql.norm.ExpandNestedQueries$.expandSelect(ExpandNestedQueries.scala:108)
at io.getquill.context.sql.norm.ExpandNestedQueries$.apply(ExpandNestedQueries.scala:30)
at io.getquill.context.sql.norm.ExpandNestedQueries$.io$getquill$context$sql$norm$ExpandNestedQueries$$expandContext(ExpandNestedQueries.scala:48)
at io.getquill.context.sql.norm.ExpandNestedQueries$$anonfun$3.apply(ExpandNestedQueries.scala:41)
at io.getquill.context.sql.norm.ExpandNestedQueries$$anonfun$3.apply(ExpandNestedQueries.scala:41)
at scala.collection.immutable.List.map(List.scala:284)
at io.getquill.context.sql.norm.ExpandNestedQueries$.expandNested(ExpandNestedQueries.scala:41)
at io.getquill.context.sql.norm.ExpandNestedQueries$.apply(ExpandNestedQueries.scala:30)
at io.getquill.context.sql.norm.ExpandNestedQueries$.apply(ExpandNestedQueries.scala:23)
at io.getquill.context.sql.idiom.SqlIdiom$class.translate(SqlIdiom.scala:44)
at io.getquill.PostgresDialect$.translate(PostgresDialect.scala:43)
at io.getquill.context.ContextMacro$class.translateStatic(ContextMacro.scala:51)
at io.getquill.context.ContextMacro$class.translate(ContextMacro.scala:37)
at io.getquill.context.ContextMacro$class.expand(ContextMacro.scala:24)
at io.getquill.context.QueryMacro.expand(QueryMacro.scala:8)
at io.getquill.context.QueryMacro.expandQueryWithMeta(QueryMacro.scala:118)
at io.getquill.context.QueryMacro.expandQuery(QueryMacro.scala:37)
at io.getquill.context.QueryMacro.runQuery(QueryMacro.scala:23)
Workaround
Use tuples to contain the embedded entities.
@getquill/maintainers
The text was updated successfully, but these errors were encountered:
Version: (e.g.
3.4.2-SNAPSHOT
)Module: (e.g.
quill-sql
)Database: (e.g.
ALL
)Expected behavior
The following query should work:
Actual behavior
The following exception happens:
Workaround
Use tuples to contain the embedded entities.
@getquill/maintainers
The text was updated successfully, but these errors were encountered: