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

Distinct with Embedded Entity crashes #1564

Closed
deusaquilus opened this issue Aug 15, 2019 · 1 comment
Closed

Distinct with Embedded Entity crashes #1564

deusaquilus opened this issue Aug 15, 2019 · 1 comment

Comments

@deusaquilus
Copy link
Collaborator

Version: (e.g. 3.4.0-SNAPSHOT)
Module: (e.g. quill-sql)
Database: (e.g. ALL)

This query:

Distinct with embedded does not work:
case class Parent(id:Int, emb1:Emb)
case class Emb(a:Int, b:Int) extends Embedded
run { query[Emb].map(e => Parent(1, e)).distinct }

Causes the following error:

cmd33.sc:1: exception during macro expansion: 
java.lang.IllegalStateException: The monad composition can't be expressed using applicative joins. Faulty expression: '(1, e)'. Free variables: 'List(e)'.
	at io.getquill.util.Messages$.fail(Messages.scala:16)
	at io.getquill.context.sql.idiom.SqlIdiom$$anonfun$3.apply(SqlIdiom.scala:42)
	at io.getquill.context.sql.idiom.SqlIdiom$$anonfun$3.apply(SqlIdiom.scala:42)
	at scala.Option.map(Option.scala:146)

@getquill/maintainers

@deusaquilus
Copy link
Collaborator Author

Fixed via #1597

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

No branches or pull requests

1 participant