-->
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: HQL select from (select ...)
PostPosted: Wed Aug 12, 2009 4:08 am 
Newbie

Joined: Wed Aug 12, 2009 3:49 am
Posts: 1
I finish some selections with hibernate criteria but now that criterias need to work with big collection of data. I found better sql query which is faster than converted previous query bat here is problem. How to convert that sql query to hql.


Database : MYSQL
SQL query example: create sub table with inline view and afther that get other related data. Biggest problem is with searching by external attribute.
----------------------------------------------
Select *
from
(SELECT
*
FROM Item1
WHERE someexpression
ORDER BY .... LIMIT 200 //here is another problem. I can not find solution how to search
// this sub query by some attribute ( programaticaly ) which is in someItem2 table
) ItemTempTable
Inner join someItem2
-----------------------------------------------


Top
 Profile  
 
 Post subject: Re: HQL select from (select ...)
PostPosted: Wed Aug 12, 2009 4:29 am 
Newbie

Joined: Wed Aug 12, 2009 4:28 am
Posts: 1
enoahmedspahic wrote:
I finish some selections with hibernate criteria but now that criterias need to work with big collection of data. I found better sql query which is faster than converted previous query bat here is problem. How to convert that sql query to hql.


Database : MYSQL
SQL query example: create sub table with inline view and afther that get other related data. Biggest problem is with searching by external attribute.
----------------------------------------------
Select *
from
(SELECT
*
FROM Item1
WHERE someexpression
ORDER BY .... LIMIT 200 //here is another problem. I can not find solution how to search
// this sub query by some attribute ( programaticaly ) which is in someItem2 table
) ItemTempTable
Inner join someItem2
-----------------------------------------------

Thanks for your idea !
simulation taux banque credit immobilier de France - Credit immobilier de France, simulation credit immobilier. Résultat mitigé pour le crédit immobilier de France.simulation taux banque credit immobilier de France


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.