Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- big_messy_sql = "select t1.f1 as somealias, t2.f2 as somehthingelse from obj1 t1, obj2 t2 where crazy_conditions....";
- Query query = entityManager.createNativeQuery(big_messy_sql);
- List<Object> results = query.getResultList();
- for (Object oRow : results) {
- Object[] r = (Object[]) oRow;
- // Do more crazy stuff
- }
- 15:39:02,089 INFO [Version] Hibernate Annotations 3.4.0.GA
- 15:39:02,167 INFO [Environment] Hibernate 3.3.2.GA
- 15:39:02,183 INFO [Environment] hibernate.properties not found
- 15:39:02,198 INFO [Environment] Bytecode provider name : javassist
- 15:39:02,198 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
- 15:39:02,495 INFO [Version] Hibernate Commons Annotations 3.1.0.GA
- 15:39:02,511 INFO [Version] Hibernate EntityManager 3.4.0.GA
- 12:06:09,031 INFO [BigDecimalType] could not read column value from result set: id; S0022: Invalid column name 'id'.
Add Comment
Please, Sign In to add comment