| Hibernate version: 
3.0.5
 
 Full stack trace of any exception that occurs:
 [java] org.springframework.orm.hibernate3.HibernateQueryException: could not instantiate: ...Bla; nested exception is org.hibernate.QueryException: could not instantiate: ...Bla
 [java] org.hibernate.QueryException: could not instantiate: ...Bla
 [java]      at org.hibernate.hql.HolderInstantiator.instantiate(HolderInstantiator.java:45)
 [java]      at org.hibernate.loader.hql.QueryLoader.getResultList(QueryLoader.java:376)
 ...
 
 Happens in this query:
 select new com....Bla(a.id, ap.accountCode) From AccAccountValue as a left join fetch a.accAccount as ap
 
 AccAccountValue has a many-to-one association to AccAccountValue as accAccount (private com...AccAccountValue accAccount;). For some records this association is null and leads to the above exception.
 
 For a row with a null association, HolderInstantiator has a "Object[] row" with only 1 item, instead of 2 ("select new com....Bla(a.id, ap.accountCode)").
 
 Am I doing something wrong? Shouldn't hibernate set fields of a null association to null? Or is this simply not possible currently? Should I file an enhancement request?
 
 Ara.
 
 
 |