-->
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: Question - Returning Non-Managed entities
PostPosted: Mon May 26, 2008 10:06 am 
Newbie

Joined: Wed May 16, 2007 11:06 am
Posts: 1
Hi Guys,

Hibernate version: 3.0.5

Database being used: Sybase ASE 11/12/15 - TDS 5.5

My question is about one of the hibernate 3.2 features - topic 16.1.5. Returning non-managed entities - shown in the link below:
http://www.hibernate.org/hib_docs/refer ... /#d0e13267

To sum up, in this link is shown the possibility to do something like this:

Code:
sess.createSQLQuery("SELECT NAME, BIRTHDATE FROM CATS")   
        .setResultTransformer(Transformers.aliasToBean(CatDTO.class));


As I'm using native SQL for some reports, I'd like to avoid having conversion processes being written between the Object[] returned and my own DTO - since I'll end up creating one DTO for each existent report.

What I'd like to know is:
Is there a way of doing it in hibernate 3.0.5? Since the SQLQuery interface, in 3.0.5, doesn't have the setResultTransformer(...) method.

Or, in case I convince the client about the update to 3.2, who can state what are (if any) the risks or impacts for the project? Any changed Interface? Is there anything that could make the decision of updating not worth?

Thanks in advance.


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.