I need to know what is the difference between JoinQueryOver and JoinAlias, and when to use each?
QueryOver Series - Part 2: Basics and Joining by Andrew Whitaker gives a very good explanation:
Summary:
IQueryOveris a generic type with two type parametersTRootandTSubType.Selectoperates onTRootwhile other QueryOver methods operate onTSubType.TRootstays the same as you’re building a query, butTSubTypechanges when you join usingJoinQueryOverJoinQueryOverandJoinAliasadd joins to your query.JoinAliasdoesn’t changeTSubType, butJoinQueryOverdoes.- You can use aliases when building a query to refer to properties that don’t belong to
TRootorTSubType