Hi,

I am running into a problem with QueryOver.
I have an outer join (a) that has an "on" restriction that uses another 
joined table (b).

The resulting (heavily simplified) SQL looks like this:
...
  left outer join dbo.TableA a ON a.SomeColumn = b.SomeColumn
  left outer join dbo.TableB b
...

This results in the error: 'multi-part identifier "b.SomeColumn" could not 
be bound'.
However, if I manually rearrange the SQL to *first* do the join to TableB, 
it works.

My code looks like this (again, simplified):
  query.Left.JoinQueryOver(() => MainAlias.B, () => AliasB);
  query.Left.JoinQeryOver(() => MainAlias.A, () => AliasA, a => a.SomeColumn 
== AliasB.SomeColumn);

So the ordering in my code seems correct to me. Still, the SQL being 
generated has the incorrect ordering.
Is there some way to influence this ordering and, if not, which part of 
NHibernate code is responsible for determining this order?

Roy

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
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