-->
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: returning column names of a named native sql query
PostPosted: Wed Jan 11, 2006 8:19 pm 
Newbie

Joined: Thu Dec 30, 2004 11:03 am
Posts: 1
is it possible to get the column names out of a native sql query
defined in a namedquery hbm.xml file
like this

<sql-query name="findAllStpQueuesWithParmsGetMetaData" >
<!--
<return-scalar column="id" type="integer" />
<return-scalar column="name" type="string" />
<return-scalar column="description" type="string" />
-->
select id , name,description from StpQueue where browseflag = :flag
</sql-query>


if i uncomment the return-scalar part
by calling namedSQLQueryDefinition.getScalarQueryReturns();

iam able to get the column names id,name,description


but if i comment it i don't get anything.

i Know in hibernate 3.1 it auto detects types.


is there any way to get column names the same way it detects types
that is exposed to the public.

Thanks
Manoj


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.