What about this named query? It was fine with version 3.05, but with the new 3.1 I get this error message:
[org.hibernate.impl.SessionFactoryImpl] [2005-12-21 10:30:49,766] [ERROR][Severity 2] Error in named query: findClientMenu
org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list (com.domain.ISDPage -> com.domain.ISDMenu) [
select new com.dto.ISDMenuDTO(m,ps.contentType,c.content)
from com.ibm.autobahn.domain.ISDMenu m
left join fetch m.isdPage p
left join fetch p.pageSectionList ps
left join fetch ps.content c
where (ps.orderNum=1 or ps.orderNum is null) and m.menuId>0
order by m.level1OrderNum, m.level2OrderNum, m.level3OrderNum, m.orderNum
If I remove the "fetch" it works. When I'm using the "new" in the select query can't use fetch?
Thanks,
Cris
|