CaseBuilder() is throwing error #1303

pradeep-tal opened this Issue Apr 5, 2015 · 5 comments


None yet

2 participants


I am trying to create Case Expression

NumberExpression<Float> numExpression = (summary.field1.floatValue().divide(summary.field2.floatValue()).multiply(100));        
NumberExpression<Float> numberExpression2 = summary.impressions.when(0L).then(0.0F).otherwise(numExpression);

So the formed SQL Query will contain :

when summary.impression=0 then 0.0
else cast summay.field as flaot/ cast summary.field2 as float) * 100 end

it throwing error at * ...unexpected token end i guess not allowing any operators we can expect same error for / also

@timowest timowest changed the title from CaseBuilder() is throwing error . to CaseBuilder() is throwing error Apr 5, 2015
timowest commented Apr 5, 2015

Do you use Querydsl JPA or Querydsl SQL and which version? Which underlying SQL database do you use?


I am using Query DSL JPA version 3.6.2
Data base i am using is Mysql

@timowest timowest added the progress label Apr 5, 2015

How can merge this changes into version 3.6.2 which i am using currently.
does this changes available in 3.6.3 version .

timowest commented Apr 8, 2015

Once it is merged, you can use the latest snapshot from here


when this fix will be available and when it will be merged

@johnktims johnktims closed this in #1305 Apr 17, 2015
@timowest timowest removed the progress label May 9, 2015
@timowest timowest added this to the 4.0.0 milestone May 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment