Scala implicit conversion for Java enums is missing

Bug #820948 reported by Tobias Roeser on 2011-08-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

When using QueryDSL 2.2.0 with Scala, Creating queries with expressions on Java enums givens compile errors.

Code example:

override def findByPaymentStatus(paymentStatus: PaymentStatus): JuList[Payment] =
    query.from(payment).where(payment.paymentStatus $eq paymentStatus).list(payment)

Error is (copied from Eclispse IDE):

overloaded method value = with alternatives: (right: com.mysema.query.types.Expression[_$9])
 com.mysema.query.scala.escaped.BooleanExpression <and> (right: _$9)com.mysema.query.scala.escaped.BooleanExpression
 cannot be applied to (de.tototec.tupomoja.request.model.PaymentStatus)

When adding the following implicit conversion in scope, the code compiles fine:

import com.mysema.query.scala.Conversions
implicit def enumPath[E <: Enum[E]](e: E): com.mysema.query.scala.escaped.EnumPath[E] =

I think, this implicit conversion should be added to com.mysema.query.scala.Conversions object.

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Thanks for the bug report. Fixed in SVN trunk.

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.1

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers