Hi.. thanks..

But if I use:

AggregateFunction<Integer> fieldCount = sum(fieldByName(BigDecimal.class, 
"measure", measure.getColumnName())).as(
                        measure.getColumnName());

I have this error:

Type mismatch: cannot convert from Field<Integer> to 
AggregateFunction<Integer>  or

if i use AggregateFunction<Integer> fieldCount = 
(AggregateFunction<Integer>) count(fieldByName(BigDecimal.class, "measure",
                        
measure.getColumnName())).as(measure.getColumnName());

In runtime, i have:  org.jooq.impl.FieldAlias cannot be cast to 
org.jooq.AggregateFunction





Em sexta-feira, 27 de março de 2015 09:06:20 UTC-3, [email protected] 
escreveu:
>
> Hi,
>
> Jooq not generate alias to AggregateFunction<T> in MySQL
>
> Example:
>    
>       
> AggregateFunction<Integer> fieldCount = sum(fieldByName(BigDecimal.class, 
> "measure", measure.getColumnName()).as(
>                         measure.getColumnName()));
>
> ...
>
>
> DSLContext create = using(con, SQLDialect.MYSQL);
> create.select(fieldCount).from(TABLE);
>
>
> Generate:
>    
>      SELECT SUM(med_field) from TABLETEST;
>
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to