Code: Select all
cq.select(pRoot<Student>.get("presenter")).distinct(true);
Code: Select all
cq.select(pRoot.<Student>get("presenter")).distinct(true);
Moderator: admin
Code: Select all
cq.select(pRoot<Student>.get("presenter")).distinct(true);
Code: Select all
cq.select(pRoot.<Student>get("presenter")).distinct(true);
I was just thinking that myself. It looks like a type witness, and type witnesses go after the dot, not before.PtFyEH wrote: ↑Sun Jun 26, 2016 3:38 amIn the correct answer the third row of the citeriaquery is:
This confuses me because i expect it to beCode: Select all
cq.select(pRoot<Student>.get("presenter")).distinct(true);
It appears to be invalid Java syntax or am i missing something?Code: Select all
cq.select(pRoot.<Student>get("presenter")).distinct(true);
Users browsing this forum: No registered users and 66 guests