-->
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.  [ 2 posts ] 
Author Message
 Post subject: HQL Queries and Tools
PostPosted: Wed Dec 17, 2003 9:14 am 
Newbie

Joined: Tue Dec 16, 2003 7:28 pm
Posts: 2
Location: Columbus, OH
Greetings!

I am desiring to write a tool (Xdoclet extension) for a current project which, based upon an arbitrary named HQL query in the hbm file, will generate a POJO representing one row of the result of the query.

Query will return the types, but I am wondering if there is some way to use NamedSQLQuery which has the names of the returned aliases (which I would use to generate the bean).

I'm sorry to ask, I spent a couple of hours pouring through google and the api, and haven't found anything. I'm hoping that someone here might be able to help.

Thanks in advance,
matt


Top
 Profile  
 
 Post subject: It stands to reason....
PostPosted: Wed Dec 17, 2003 10:33 am 
Newbie

Joined: Tue Dec 16, 2003 7:28 pm
Posts: 2
Location: Columbus, OH
That as soon as I post a query, the lightbulb goes off and I figure it out.

I'll create a class (because it's easier to add it for the customer than to maintain a patched version of hibernate) which is in package net.sf.hibernate.impl which will expose methods of InternalNamedSQLQuery. This, then, I'll use to obtain my return alias names and types, then I can build the return POJO.


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