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.