It should work, i wonder if it directly corresponds to this
from f in context.Session.Linq<Floor>()
select new {f.Id,f.Name,f.Building.Id,f.Building.Name}


Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike




On Fri, Aug 7, 2009 at 6:19 PM, abm <[email protected]> wrote:

>
> My model has a relationship between building and floor entities. Using
> AR LINQ should I be able to run the following query:
>
> Dim query = From f In context.Session.Linq(Of Floor)()
>            Select f.Id, f.Name, f.Building.Id, f.Building.Name
>
> Dim results = query.ToList()
>
> It doesn't seem to work as f.Building.Id and f.Building.Name require a
> sql join from floor to building table. However, linq queries against a
> single entity work great!
>
> Better layout at:
> http://stackoverflow.com/questions/1212564/linq-to-nhibernate-query-with-multiple-entities
>
> -Abm
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to