-->
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.  [ 7 posts ] 
Author Message
 Post subject: can i use hql find a part of property from class???
PostPosted: Fri Oct 28, 2005 1:43 am 
Newbie

Joined: Thu Sep 29, 2005 9:54 pm
Posts: 17
i only want to select a part of field in my hql sentence

such as


Select id,name,type From className


can i do it??

and how can get result???or fill object list


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:05 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Code:
Iterator it = sess.createQuery("select id, type, name from className").list().iterator();

while ( it.hasNext() ) {
    Object[] tuple = (Object[]) it.next();
    Long id = tuple[0];
    String type  = tuple[1];
    String name = tuple[2];
}


Top
 Profile  
 
 Post subject: and how can use a store product realization my turn to page
PostPosted: Fri Oct 28, 2005 2:11 am 
Newbie

Joined: Thu Sep 29, 2005 9:54 pm
Posts: 17
thank you for your reply

and i have other question

it's how can use a store product realization

turn to page program

i use the hibernate version is 2.0


thsk


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:12 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
can you retransmit that?


Top
 Profile  
 
 Post subject: other question
PostPosted: Fri Oct 28, 2005 2:16 am 
Newbie

Joined: Thu Sep 29, 2005 9:54 pm
Posts: 17
hi everybody

if i use part of query obtaion result


it's capability whether good????


or has other method adjust hibernate????


who can tell me ????


thanks a lot of


Top
 Profile  
 
 Post subject: retransmit
PostPosted: Fri Oct 28, 2005 2:19 am 
Newbie

Joined: Thu Sep 29, 2005 9:54 pm
Posts: 17
yes i can

thank you


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 2:37 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
let's try this one more time ;)


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

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.