From everything I understand, JoinAlias is supposed to be functionally similar to joinquery in all ways but the return object. IE JoinAlias returns the outer IQueryOver and the JoinQueryOver returns one for the join object. However in the following example:
query.Left.JoinAlias(() => eventAlias.Children, () => childAlias);
query.Where(() => childAlias.Name.IsIn(SearchCriteria.SelectedNames.ToArray()));
The RowCount is 29.
But here:
query.Left.JoinQueryOver(s => s.Children).Where(Restrictions.In(Projections.Property<Child>(x => x.Name),
SearchCriteria.SelectedNames.ToArray()));
query.RowCount(); returns 18.
The 18 is exactly what I want. There are 18 entries on the db.
I did some research on DistinctRootEntityResultTransformer() which brings the count to 14 after the alias, but this is still not correct.
On a high level I'd like to gain better understanding for what is happening, on an immediate level I'd like to know what to do about it if I need to use Alias.
Thanks
--- EDIT --- So This should be a left join, becuase count can be 0, and i just want the parent items. As noted in an answer, when I do run the exact same filter with the same join (left) the results are identical. However, when no one searches, I still create the alias, and without filtering at all I am getting 29.