QueryDsl and Embeddables with OneToMany | Wierd Generated SQL Select by "."

89 views Asked by At

I am expermenting querydsl with embeddable, on the following set:

@Entity
Class Ent1 {
   @Embedded
   Embed embed;
}

@Entity
Class Ent2 {
   @ManyToOne
   Ent1 ent1;
}

@Embeddable
Class Embed {
   @OneToMany
   List<Ent2> ent2List;
}

When i use following dsl query

query
        .select(Projections.constructor(Embed.class, QEnt1.qEnt1.ent2List))
        .from(QEnt1.qEnt1)
        .fetch();

Generate this sql

    select
        . as col0,
        ent2.ent1_id as col1
    from
        Ent1 ent1
    inner join
        Ent2 ent2 
            on ent1.id=ent2.id 

following generated line breaks the query

. as col0

Sql works fine without generated dot line, any ideas how to fix ?

Note: Im using oracle sql

0

There are 0 answers