This is a mirror of a stackoverflow question I have open, found here: 
http://stackoverflow.com/questions/11958654/nhibernate-queryover-multiple-join-aliases-only-first-one-generates-a-join.

The question linked contains all of the code I'm using. The problem seems to 
come down to the mapping table, a table with a composite id over 2 entities.

The query provided in my test class can be simplified even further to show the 
issue, down to this:

var query = Session.QueryOver<ShirtShirtStyle>(() => shirtStylesAlias)
                    .JoinAlias(() => shirtStylesAlias.ShirtStyle, () => 
shirtStyleAlias)
                    .List();

Regardless of join type, this query will simply not generate the expected 
result - the only SQL generated is a basic SELECT * FROM ShirtShirtStyle. There 
is never a join to ShirtStyle, and I don't understand why. I can't find much on 
this issue, which implies I'm doing something fundamentally wrong...but what is 
it? How would I achieve this query?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/nhusers/-/TsU91yTsyFsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to