Thank you nadav. That worked except that now it is doing two left
outer joins instead of one inner join.

            var result = from obj in
Session.GetISession().Linq<Table3>()
                    where obj.Table2.Table1Id == myId
                    select obj;

How do I control the type of join?

Rick

On Apr 2, 12:32 am, nadav s <[email protected]> wrote:
> if your situation is what you said it is (table1, table2, table3)
> why wouldn't you want a refenrece from class3 to class2 (there is a foreign
> key, its not an arbitrary join by some arbitrary column, it is by the
> foreign key). if you set a reference, you can just say
>
> from class3 where class3.Class2Reference.SomeProperty = x
>
> NH will do the join for you and you'll get the exact sql you were expecting

-- 
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