I have a many-to-one relation mapped between two entities A and B. I will use Fruit and Color to simulate my scenario:
Assuming all the fruit has only one color. So I have a Color property in my Fruit class and in my mapping code for Fruit I have:
ManyToOne(f=>f.Color, mapper=>mapper.Column("ColorId"));
And the generated SQL has the following:
Select f0_.Name, f0...From Fruit f0_
left outer join Color c0_
on f0_.ColorId = c0_.id
I am wondering if there is any way for force an inner join instead of outer join. Because from the business perspective, a fruit without a color is not really a fruit and shouldn't exist.