Below are HQL queries for specific type of classes
select a from Animal a
where TYPE(a) in ('Cat', 'Dog')
and a.sex = 'Male'
order by a.name
select a from Animal a
where a.class in ('Cat', 'Dog')
and a.sex = 'Male'
order by a.name
Im wondering is there and equivalent using QueryOver?
You can use
GetTypewith theIsInQueryOver extension method to accomplish this:You should use the discriminator values that your NHibernate mapping uses.