-->
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.  [ 3 posts ] 
Author Message
 Post subject: Returning typesafe objects from sql queries ?
PostPosted: Thu Aug 18, 2005 4:23 am 
Newbie

Joined: Thu Jan 08, 2004 12:05 pm
Posts: 14
Hi!

Is it possible ?. With hql it's "select new com.x.AType(...) from .... ". I've tried something like this but didn't work(hibernate it's complaining about com.x.AType as not beeing an entity).

Code:
<sql-query name="nquery">
    <return alias="aType" class="com.x.AType">
      <return-property name="aProperty" column="PROPERTY_COLUMN"/>
    </return>
    SELECT aType.PROPERTY_COLUMN AS aProperty
    FROM ATYPE_TABLE aType
</sql-query>


Hibernate version:3

Thanks.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 4:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no - but we are getting more and more request for this .... vote/create jira issues for it...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 18, 2005 5:07 am 
Newbie

Joined: Thu Jan 08, 2004 12:05 pm
Posts: 14
done
http://opensource.atlassian.com/projects/hibernate/browse/HHH-877

thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.