posted 15 years ago
there are 2 entities:
Entity 1:
Entity 2:
Question: out of the following 2 queries, which one will return students who have given only one Presentation?
1. select s from Student s where size(s.presentations)=1
2. select s from Student s where (select count(p) from s.presentations p)=1
According to enthuware the 2nd one is correct.
Should'nt the first option be correct as size(s.presentations) would return the size of the collection as an integer and presentations is a Collection type...???
please help...