HQL query required using START WITH and CONNECT BY PRIOR SQL keywords

1,250 views
Skip to first unread message

G. Raghavender Raju

unread,
May 22, 2011, 4:36:41 AM5/22/11
to bo...@googlegroups.com
Team,

I've an SQL query with the combination of START WITH and CONNECT BY PRIOR keywords, for which I would like to convert the query into HQL, so please share me some example codes where in I can run the HQL and SQL statements with the same.

Looking forward for your valuable responses.

--
Thanks & Regards
G. Raghavender Raju

Janmejay Singh

unread,
May 22, 2011, 9:32:37 PM5/22/11
to bo...@googlegroups.com
> --
> You received this message because you are subscribed to the Google
> Groups "Bangalore Open Java Users Group- BOJUG" group.
> To post to this group, send email to bo...@googlegroups.com.
> To unsubscribe from this group, send email to bojug
> +unsub...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/bojug?hl=en.

AFAIR these are too oracle specific. I may be wrong, but i don't think
ORMs would support db specific queries to this extent.

BTW, check org.hibernate.dialect package. You want to look at
Oracle8iDilect, Oracle9iDilect and Oracle10gDilect(10g extends 9i and 9i
extends 8i).

--
Regards,
Janmejay
http://codehunk.wordpress.com

signature.asc

Kamal

unread,
Jun 13, 2011, 5:51:17 AM6/13/11
to Bangalore Open Java Users Group- BOJUG

You can use the createSqlQuery version to pass in the sql query
instead of HQL. Hibernate provides a mechanism to take the output
returned by the sql query and map it as hibernate managed objects.

Regards,
Kamal
Reply all
Reply to author
Forward
0 new messages