-->
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: Dyanmic Instantiation w/ SQL queries
PostPosted: Tue Dec 14, 2004 3:30 pm 
Beginner
Beginner

Joined: Sun Oct 03, 2004 8:50 am
Posts: 32
Location: McLean, VA
I was wondering if it was possible to use dynamic instantiantion in regular SQL queries with Hibernate. In other words could I do this

select new FooObject(col1, col2, col3) from tableFoo where col1='someText'

I know the above query actually ends up being an SQL/HQL hybrid, but I wasn't sure if it was possible or not.

Hibernate version:
2.1.6

_________________
- Chad


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 14, 2004 11:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
No, select new is only possible in pure HQL.


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.