Page 1 of 1

About Question enthuware.oce-jpad.v6.2.583 :

Posted: Sun Jun 26, 2016 3:38 am
by PtFyEH
In the correct answer the third row of the citeriaquery is:

Code: Select all

cq.select(pRoot<Student>.get("presenter")).distinct(true);
This confuses me because i expect it to be

Code: Select all

cq.select(pRoot.<Student>get("presenter")).distinct(true);
It appears to be invalid Java syntax or am i missing something?

Re: About Question enthuware.oce-jpad.v6.2.583 :

Posted: Mon Sep 17, 2018 2:34 pm
by __JJ__
PtFyEH wrote:
Sun Jun 26, 2016 3:38 am
In the correct answer the third row of the citeriaquery is:

Code: Select all

cq.select(pRoot<Student>.get("presenter")).distinct(true);
This confuses me because i expect it to be

Code: Select all

cq.select(pRoot.<Student>get("presenter")).distinct(true);
It appears to be invalid Java syntax or am i missing something?
I was just thinking that myself. It looks like a type witness, and type witnesses go after the dot, not before.

Re: About Question enthuware.oce-jpad.v6.2.583 :

Posted: Wed Sep 19, 2018 9:25 pm
by admin
You are right. Fixed.
thank you for your feedback!