RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
ject: RE: generate SQL Hibernate Query using session Jerson - What I would likely suggest you consider is creating a DTO object that resembles your result from the SQLQuery. You can then use one of the stock Hibernate Transformers to convert the SQL results into instances of this DTO Bean and t

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
Users Mailing List Subject: RE: generate SQL Hibernate Query using session Jerson - What I would likely suggest you consider is creating a DTO object that resembles your result from the SQLQuery. You can then use one of the stock Hibernate Transformers to convert the SQL results into instances of

RE: generate SQL Hibernate Query using session

2011-02-17 Thread CRANFORD, CHRIS
Jerson - What I would likely suggest you consider is creating a DTO object that resembles your result from the SQLQuery. You can then use one of the stock Hibernate Transformers to convert the SQL results into instances of this DTO Bean and then you can return the beans to your view to iterate ov

Re: generate SQL Hibernate Query using session

2011-02-17 Thread Mead Lai
I think you may use the Composite Class in Hibernate. Query q = session.createQuery (" select new NewCompositeClass(members, classInfo.className) " + " from Members members, ClassInfo classInfo " + " where members.level = classInfo.classCode "); and you need a class:NewCompositeClass.java

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
error...I couldn't find any Thanks in advance Many Thanks and Regards, Jerson From: Jerson John [mailto:jer...@cprvision.com] Sent: Friday, February 18, 2011 10:53 AM To: 'Struts Users Mailing List' Subject: RE: generate SQL Hibernate Query using session Hi, Thanks for your

RE: generate SQL Hibernate Query using session

2011-02-17 Thread Jerson John
ce in properties.Please advice me a approach for thisThanks in advance Many Thanks and Regards, Jerson -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Friday, February 18, 2011 10:34 AM To: Struts Users Mailing List Subject: Re: generate SQL Hibernate Query using se

Re: generate SQL Hibernate Query using session

2011-02-17 Thread Dave Newton
What does having joins have to do with not being able to map to your data model? Dave On Feb 17, 2011 8:43 PM, "Jerson John" wrote: > Hi, > I am trying to generate SQL query using session.createSQLQuery and > returning the list object..This select query contains joins and so it cannot > be mappe