Posted on April 12, 2007 at 4:27 pm
Se você utiliza o Hibernate regularmente e já passou pela situação de ter que utilizar o SQL gerado por ele por algum motivo (no meu caso, precisei fazer um “insert as select” em uma tabela não mapeada no Hibernate), conseguir a query convertida é relativamente simples:
Session session; // uma sessão Hibernate qualquer
HQLQueryPlan queryPlan = [...]
Posted on April 12, 2007 at 12:27 pm
If you use Hibernate regularly and had to - for some reason - get access to the SQL code generated by it (in my case I needed to do an “insert as select” on a non-hibernate-mapped table), getting the converted query is pretty straightforward:
Session session; // a plain vanilla hibernate session
HQLQueryPlan queryPlan = ((SessionFactoryImpl) session.getSessionFactory()).getQueryPlanCache().getHQLQueryPlan(hqlStatement, [...]
Posted on July 28, 2005 at 9:58 pm
O “Road to Hibernate” é um tutorial introdutório sobre o Hibernate (se não o melhor framework Objeto-Relacional Java, pelo menos o mais “buzz word” já há um bom tempo).
O tutorial cobre muitos pontos críticos da tecnologia (como os problemas causados pela definição errada de caches e modelo de transaçao, que só são percebidas “tarde demais”).