When we use composite keys the generated sql is incompatible in the majority of rdbms.
If i look at IdentCode.java i don't understand how it might works. The resolveAsAlias method is inadeguate for catch all the cases.
For example with composite keys the following jpql queries will fails:
select count(distinct e) form entity -->(SQL) select count(distinct id_part1, id_part2 ) from entity
select e from entity where e exists (select ee from entity as ee) -->(SQL) select id_part1, id_part2 from entity where (id_part1, id_part2) exists (select (id_part1, id_part2) from entity)
select e, count from entity e group by e (HHH-1615)