I have a table has below
Code:
@entity
@table(name="studentClass")
public class studentClass{
 private String name;
 private Integer marks;
 ...../*Many other attributes*/
 set<String> listOfAddress;
 ....
 @ElementCollection(fetch=FetchType.Eager)
 @CollectionTable(name="address")
 public void getListOfAddress(){
 }
}
I have used @element collection for the Set <String> "address".Now i need to have a hibernate query criteria with projection to get only the names and address from the studentClass table .
Please provide me the hibernate query criteria what i have to execute.Any link or help is highly appriciated.