.from(tbCar)
.where(tbCar.modelo_carro.eq(modeloID))
.leftJoin(tbModel)
.on(tbCar.modelo_carro.eq(tbModel.id_modelo))
.innerJoin(tbColor)
.on(tbCar.cor_carro.eq(tbColor.id_cor))
.groupBy(tbCar.modelo_carro)
.transform(
groupBy(tbCar.modelo_carro).as(
Projections.bean(CarDTO.class,
Projections.constructor(ModelDTO.class, tbModel.nome_modelo, tbModel.ano_modelo),
set(Projections.bean(ColorDTO.class,tbColor.nome_cor)).as("listaColor")
)));
But shows the error: Unsupported expression new ModelDTO(model.nomeModelo, model.anoModelo)