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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
cosminvacaroiu

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

Post by cosminvacaroiu »

Isn't it incorrect to do a:

Code: Select all

select s.presentations from Student s;

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Why do you think it is incorrect?

Guest

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

Post by Guest »

admin wrote:Why do you think it is incorrect?
Because presentations is a collection. And you can't have a collection in the select list.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right but this question doesn't have this option.

BTW, you can select a collection but you have to declare an identification variable for it in the from clause:

select p from Student s join s.presentations p;

heaven

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

Post by heaven »

The assumed correct answer D is in fact illegal by spec as stated above.
cq.select(student.<Presentation>get("presentations")) is in fact select of a collection (select s.presentations ...)

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right.

Code: Select all

cq.select(student.<Presentation>get("presentations")).distinct(true); //5
has now been changed to

Code: Select all

cq.select(presentation).distinct(true); //5


thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests