Closed pronvis closed 7 years ago
I've done some testing. I think this case is very close to #584. If you add : Status.Type
to your lift
, it will work. Here's the complete example:
val q = quote {
query[UserStatus].filter(s => s.status == lift(Status.B: Status.Type))
}
I don't think there is an easy way to fix this issue.
closing in favor of https://github.com/getquill/quill/issues/584
Version: 0.6.0 Module: quill-jdbc
Expected behavior
Select rows from DB.
Actual behavior
Compile time error.
Steps to reproduce the behavior
For example we have a Table with column type char(1) that actually a enum. In scala code we want to use handwritten objects as enums, for example:
To use this class in Quill we should add mappedEncodings:
Now we can create and run those queries:
And all will be fine! But, if we want to use this query:
We will have
Of course we can add new mappedEncoding:
implicit val encodeBType = mappedEncoding[Status.B.type, String](_ => "B")
But this is not want we want to do.@getquill/maintainers