-->
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.  [ 4 posts ] 
Author Message
 Post subject: Order by as argument in the query ??
PostPosted: Wed Sep 03, 2003 5:21 am 
Regular
Regular

Joined: Thu Aug 28, 2003 2:42 pm
Posts: 77
Location: The Netherlands
Hellu,

What I understand now from testing and the manual is that I have to hardcode my order by value in the HQL...:(
However, I would like to submit this as a parameter to my query... just like MaxRowResult(..)...
How is this possible ?

Ed


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 03, 2003 6:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use the Criteria API.


Really, this is a limitation of the underlying SQL/JDBC APIs which Hibernate lives on top of.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 03, 2003 11:54 am 
Regular
Regular

Joined: Thu Aug 28, 2003 2:42 pm
Posts: 77
Location: The Netherlands
Gavin,

Tx, but the problem is that I use the Query class to handle all my queries that are stored in one mapping file.
Any idea how to combine this ?
I was looking for something like:

createCriteria(Query).add(Order.asc("age").list()...

Ed


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 03, 2003 8:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This is not supported. If you require "dynamic" queries, that is what QBC is *for*.


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