-->
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.  [ 3 posts ] 
Author Message
 Post subject: can use expression: select new classname with createSQLQuery
PostPosted: Wed Mar 23, 2005 3:29 am 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
we can use expression: select new classname(table1.field...) from Table1 table1 where .............

with Query query = session.createQuery(...........


can use expression: select new classname (........)

with createSQLQuery

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 5:36 am 
Newbie

Joined: Thu Mar 17, 2005 7:50 am
Posts: 8
Location: Tunis
Hi worldcreatxr!!
I think you can't pass HSQL queries to the createSQLQuery method.
Regards.
Walid.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 6:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
select new is not SQL syntax ,)

(but you could put entry in the jira for a wish to be able to set the returnclass of a query to be your own class and we would construct it and call setters on it ....)

/max

_________________
Max
Don't forget to rate


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