Thanks for the help Vlad, you got me way closer than I was before, but I'm still running into an issue.
So when I do my hql as follows
Code:
select assoc
from Assoc
join treat(assoc.to as ObjB)
where assoc.from = :fromEntity
It actually works nicely and I get sql that looks like this...
Code:
select
assoc.properties
from
ASSOC assoc
inner join
OBJ obj
on assoc.to_id = obj.id
inner join
OBJB objb
on obj.id = objb.id
where
assoc.from_id=?
Then when the code tries to retrieve a property for objb it runs into joins again.
To try and mitigate this I tried to get objb more eagerly by including it in my query like...
Code:
select assoc, assoc.to
from Assoc
join treat(assoc.to as ObjB) b
where assoc.from = :fromEntity
(note: I also tried using the alias in the select)
This for some reason puts all of the joins back in.
The exceptionally strange part is that it left outer joins all the objects, except objb which it keeps as an inner join.
Do you have any other suggestions, at this point I'm about ready to pick through the library code to see if this might be a bug somehow.
Thanks again for all your help so far!