Fluent Nhibernate left join

前端 未结 2 760
暗喜
暗喜 2021-02-07 07:53

I want to map a class that result in a left outer join and not in an innner join.

My composite user entity is made by one table (\"aspnet_users\") and an some optional p

2条回答
  •  日久生厌
    2021-02-07 08:23

    Only this did work for me (NH 3.3):

    Join("OuterJoinTable",
                    m =>
                    {
                        m.Fetch.Join().Optional();
                        m.KeyColumn("ForeignKeyColumn");
    
                        m.Map(t => t.Field, "FieldName");
                    });
    

提交回复
热议问题