-->
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: How to use CONNECT BY clause in a HQL
PostPosted: Wed Mar 02, 2005 4:52 am 
Newbie

Joined: Wed Mar 02, 2005 4:37 am
Posts: 2
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version:[/b]
Hibernate 2.1.6
[b]Name and version of the database you are using:[/b]
Oracle9i

I wanted to know whether HIbernate's HQL supports CONNECT BY clause or not. I have the following SQL query which I want to write through hibernate

SELECT node_id, level
FROM t_tknd_node
WHERE level <=
(
SELECT level
FROM t_tknd_node
WHERE node_id = ?
START WITH ltrim(rtrim(PRNT_NODE_ID)) is null
CONNECT BY prnt_node_id = PRIOR node_id
)
START WITH ltrim(rtrim(PRNT_NODE_ID)) is null
CONNECT BY prnt_node_id = PRIOR node_id
ORDER BY level


Any pointer will be higly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 9:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Use a native sql query. http://www.hibernate.org/hib_docs/reference/en/html/querysql.html


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 03, 2005 12:05 am 
Newbie

Joined: Wed Mar 02, 2005 4:37 am
Posts: 2
Hi,
I think y question was not very clear. the question has 2 parts:
1. Does HQL supports CONNET BY clause
2. If yes then how to use that.


I will add a third question:
3. If have to use the native sql then how would I use it for the query stated. I looked up at the hibernate documentation and found it pretty cumbersome and thus would appreciate a example in thuis case.

My preference is to use HQL and thus would give approach for usage of HQL as the first priority.

Satish


Top
 Profile  
 
 Post subject: Re: How to use CONNECT BY clause in a HQL
PostPosted: Mon Aug 03, 2009 6:59 am 
Newbie

Joined: Tue Mar 03, 2009 5:45 am
Posts: 1
Please have a look at:
https://www.hibernate.org/117.html

Currently HQL Does not support hierarchical queries.

Regards
Satyendra Patel


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.