I use QueryDSL to map my queries to my Beans using this:
QAmbiente qitem=new QAmbiente("x");
SQLTemplates template = new MySQLTemplates();
Configuration configuration = new Configuration(template);
SQLQuery query = new SQLQuery(conn, configuration);
List<Ambiente> items = query.from(qitem).list(Projections.fields(Ambiente.class, qitem.idEmpresa));
My problem is that I have nested classes for primary keys, for example:
@EmbeddedId
protected AmbientePK ambientePK;
Then, when I try to execute the above code, an error occurs:
The bean of type: br.com.fitsoft.cnfe.model.domain.Ambiente has no property called: idEmpresa
The problem only occurs when I put a field that is part of my primary key.
Can anybody help me? thanks
source
share