I could not make the syntax you proposed work. I kept on getting this error :
org.hibernate.AssertionFailure: undefined join type 23
I googled it and no one has figured out how to do a full join. Also, there is practically no documentation on what result it is suppose to give.
Here is my case:
It's a report query where I'm trying to get all EntityA for a list of patients. I also want to get EntityB for the same patient if there is one. it would be quite simple in SQL :
SELECT a.*, b.* from table_a a left join table_b b on a.patientId = b.patientId where a.patientId in (:patientIdList)
If the relation between Patient and EntityB was mapped in both ways (it is currently only mapped from entityB to patient), the following HQL would do the trick:
select a, b from EntityA a inner join a.patient patient left join patient.entityB b where a.patient.patientId in (:patientIdList)
But as I said in previous post, I don't want to start mapping all existing relations on the patient object or should I? With time, more than a 100 entities will have a relation to the patient.
Help me out! ;)
ps: for the moment, while looking for a better solution, I'm doing two queries...