Hibernate HQL to basic SQL

Posted by CC on Stack Overflow See other posts from Stack Overflow or by CC
Published on 2010-05-19T18:58:56Z Indexed on 2010/05/19 19:00 UTC
Read the original article Hit count: 223

Filed under:
|
|

Hello everybody,

I working on a project with Hibernate and we need to replace Hibernate with some "home made persistence" stuff. The idea is that the project is big enough, and we have many HQL queries. The problem is with the queries like

select a,b from table1, table2 on t1.table1=t2.table2

Basically all joins are not supported by our "hand made persistence" stuff.

What I would need, is to be able to do some sort of transcoder, which will take as a input the HQL queries and output some SQL, but the basic SQL without joins, something like (a dumb example)

select a from table1
where t1 IN (
select b from table2)

I hope you get the idea. My persistence layer does not supports joins.

Does anybody has any idea about something like that? Some framework, or something?

Thanks alot everybody.

C.C.

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about hql