Hi all
I have a object model a bit like this:
public class Foo
{
public int Id {get;set;}
public string FooName {get;set;}
}
public class Bar
{
public int Id {get;set;}
public Foo Foo {get;set;}
}
These correspond to tables in the database in the typical one-to-many kind of way.
Using Linq to NHibernate to query Bars according to their Foo.Id property (which should simply query the FoodId foreign key in the Bars table) produces SQL with a join!
Does anyone know why this is so? Is this standard NHibernate behaviour? Or something to do with the Linq provider? Or maybe even FluentNHibernate (which I'm using for mapping)?
Thanks
David