代码之家  ›  专栏  ›  技术社区  ›  Andrew Burns

流利的NHibernate有太多但找不到

  •  0
  • Andrew Burns  · 技术社区  · 17 年前

    我有以下FNH映射片段:

    HasManyToMany((c) => c.Plaintiffs)
        .LazyLoad()
        .WithTableName("invoicePlantiff")
        .WithChildKeyColumn("PersonReferenceID")
        .WithParentKeyColumn("invoiceID")
        .FetchType.Join();
    

    <bag name="Plaintiffs" access="iServe.Design.CslaNHibernate.CslaChildPropertyAccessor, iServe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" lazy="true" table="invoicePlantiff">
      <key column="invoiceID" />
      <many-to-many column="PersonReferenceID" class="iServe.PersonReference, iServe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" fetch="join" />
    </bag>
    

    not-found="ignore"

    .NotFound.Ignore() References() HasManyToMany 打电话。

    2 回复  |  直到 17 年前
        1
  •  8
  •   James Gregory    17 年前

    NotFound HasMany HasManyToMany

        2
  •  0
  •   Community Mohan Dere    9 年前

    HasManyToMany((c) => c.Plaintiffs)
    .LazyLoad()
    .WithTableName("invoicePlantiff")
    .WithChildKeyColumn("PersonReferenceID")
    .WithParentKeyColumn("invoiceID")
    .FetchType.Join()
    .SetAttributte("not-found", "ignore");
    

    更新:

    很抱歉,我知道有一个SetAttribute,但我不确定它是否符合你的要求。

    explains how to do this answer from stackoverflow .

    推荐文章