开发者

NHibernate: Require inner join instead of left join for References

H开发者_如何学Pythonow 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜