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.
精彩评论