Hibernate version: 2.1.4
Name and version of the database you are using: Oracle 9i
Hi all,
I´m with a problem with LazyInitializationException,
when I try the following query:
Code:
select c from Company c
left join c.companyDocuments cDoc
left join fetch cDoc.documentType cDocTp
where cDoc.nbDocument = '111222333'
and cDocTp.idDocumentType = 4
Each company can to have one or more CompanyDocument (List).
In this case, all companies have 2 documents,
where one documentType 1 and one documentType 4.
So, when I try execute the above query,
the hibernate loads 2 companyDocument for each company, but
the documentType is only loaded when the idDocumentType = 4.
How can I load the all documentType in this case?
thanks!