4

How can I change the default join type to be an inner join instead of a left outer join for mappings when I use References?

For Example:

public class SomeClassMap : ClassMap<SomeClass>
{
   public SomeClassMap()
   {
     Id(x => Id);
     References(x => x.Account);
   }
}

this usually turns out to be something like this...

FROM SomeClass  SC
LEFT OUTER JOIN Account A 
ON SC.Id = A.Id

I'd like to have this be an inner join instead of a left outer join. Any thoughts?

Joe
  • 1,043
  • 2
  • 12
  • 21

1 Answers1

2

Similar question here:

Inner or Right Outer Join in Nhibernate and Fluent Nhibernate on Many to Many collection

I'm assuming this also applies to one to many relationships. Someone please chime in if this does not hold true anymore.

Community
  • 1
  • 1
Cole W
  • 15,123
  • 6
  • 51
  • 85