-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query criteria with projection on@elementcollection
PostPosted: Wed Jan 08, 2014 3:15 am 
Newbie

Joined: Tue Jan 07, 2014 6:08 am
Posts: 2
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.