1. Hibernate ResultTransformer with addEntity - what's the correct syntax? stackoverflow.comConsider the following query:
I want to map the result to this class:
|
2. [SOLVED] Native SQL and resulttransformer problem forum.hibernate.orgIn our company we have a framework for paging. In a request object you pass page size, current page, filter and ordering,... and the query and in a response object you get the result as a List. The queries can be HQL as string, DetachedCriteria or native SQL as string. Until now the requirement for the queries was that they returned ... |
3. ResultTransformer with SQL forum.hibernate.orgList cachedResultList = new ArrayList(); Query qry = getSession().createQuery("select a as a, b as b, c as c from Some") qry.setResultTransformer(Transformers.aliasToBean(SomeDTO.class)); ScrollableResults scrollableResults = query.scroll(); scrollableResults.first(); scrollableResults.scroll(5); while (scrollableResults.next()) { Object[] rowObjects = scrollableResults.get(); SomeDTO transformedDTO = (SomeDTO)rowObjects[0]; // [b]rowObjects.size() = 1[/b] ... |