wolli,
your suggestion didn't help. It generates different sql that we expect. It generates something like:
Code:
select ...
from
...
inner join Animal a0
left outer join Cat a1 on a1.ID = a0.ID
left outer join Tiger a2 on a2.ID = a0.ID
left outer join Dog a3 on a3.ID = a0.ID
...
where
((case when a1.ID is not null then 1 .. when a3.ID is not null then 3 end = 1) and a1.ClawSize > 10)
or
((case when a1.ID is not null then 1 .. when a3.ID is not null then 3 end = 2) and a1.ClawSize > 15)
as you see, in both clause a1 (Cat) alias is used. Since a0 doesnt have ClawSize property, nhibernate finds first match, and uses it all the way down.