-->
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: Mapping attributes in the select clausule to a unique class
PostPosted: Thu Apr 22, 2004 4:05 pm 
Newbie

Joined: Fri Feb 20, 2004 10:55 am
Posts: 13
Hi friends,

I need to do any thing like this:

String sql = "select cat.originalId as {cat.id}, cat.mateid as {cat.mate}, cat.sex as {cat.sex}, cat.weight*+ " from cat_log cat where {cat.mate} = :catId"

List loggedCats = sess.createSQLQuery(sql, "cat", Cat.class)
.setLong("catId", catId)
.list();

This examples able me to select attributes from many places to a unique class.

But... this example is a SQL query. I need to do it using HQL queries.

Any way or no way?


tks for any help,

Paulo Marcio


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.