Linq Nhibernate połączył się z lewicą

Kradzież maakcja własność

To jest zapytanie, które próbuję uzyskać w NHibernate.Linq:

SELECT * FROM `thefts`
LEFT JOIN memberThefts
ON thefts.id = memberThefts.theftId AND memberThefts.memberId = 1

Chcę uzyskać listę wszystkich kradzieży, w których action.memberId == jakiś numer lub po prostu null, jeśli nie znajdzie wiersza, prosty jako kwerenda, ale to daje mi koszmar przez cały dzień!

        thefts = session.Query<Theft>()
            .Fetch(x => x.action)
            .Where(x => x.action.memberId == member.id)
            .ToList();

Wykonuje to następujący SQL:

select theft0_.id                 as id9_0_,
       memberthef1_.memberId      as memberId7_1_,
       theft0_.name               as name9_0_,
       theft0_.chance             as chance9_0_,
       memberthef1_.theftId       as theftId7_1_,
       memberthef1_.availableTime as availabl3_7_1_
from   thefts theft0_
       left outer join memberThefts memberthef1_
         on theft0_.id = memberthef1_.theftId,
       memberThefts memberthef2_
where  theft0_.id = memberthef2_.theftId
       and memberthef2_.memberId =1 /* ?p0 */

Klasa kradzieży:

    public class Theft
    {
        public virtual byte id { get; set; }
        public virtual string name { get; set; }
        public virtual byte rank { get; set; }
        public virtual byte chance { get; set; }
        public virtual MemberTheft action { get; set; }
...

I to jest mapowanie:

public TheftMap()
{
    Table("thefts");
    Id(x => x.id);
    Map(x => x.name);
    Map(x => x.id);
    Map(x => x.chance);
    References(x => x.action)
        .Nullable()
        .PropertyRef(x => x.theftId)
        .Column("id");
}

Każde rozwiązanie zrobi HQL, QueryOver itp

questionAnswers(1)

yourAnswerToTheQuestion