HbmSerializer Serializes Filter Defined on a Bag to a Filter Defined on Class

Description

I have the following class with Nhibernate Attributes defined on a Bag.

public partial class PPEntity
{

[DataMember]
[Bindable(BindableSupport.Yes)]
[Bag(0, Name = "_districts", Table = "PPD", Lazy = false, Cascade = "merge,save-update,persist,refresh,lock,all-delete-orphan", Access = "field", BatchSize = 1000)]
[Key(1, Column = "PPID")]
[OneToMany(2, Class = "Business.Entities.PPDtEntity, Business.Entities")]
[Filter(3, Name = "SysStatusFilter", Condition = "(isnull(SysStatusID,1)=:StatusID)")]
protected IList<PPDtEntity> _districts = new List<PPDtEntity>();
}

when i use HbmSerializer.Default.Serialize to generate the hbm file , the "Filter" tag is generated out side the bag tag.

The following is getting generated
<bag name="_districts" access="field" table="PPD lazy="false" cascade="merge,save-update,persist,refresh,lock,all-delete-orphan" batch-size="1000">
<key column="PPID" />
<one-to-many class="Business.Entities.PPDEntity, Business.Entities" />
</bag>
<filter name="SysStatusFilter" condition="(isnull(SysStatusID,1)=:StatusID)" />

instead of

<bag name="_districts" access="field" table="PPD lazy="false" cascade="merge,save-update,persist,refresh,lock,all-delete-orphan" batch-size="1000">
<key column="PPID" />
<one-to-many class="Business.Entities.PPDEntity, Business.Entities" />
<filter name="SysStatusFilter" condition="(isnull(SysStatusID,1)=:StatusID)" />
</bag>

Environment

None

Activity

Show:

Pierre Henri Kuaté October 22, 2009 at 5:10 PM

Sadly, this is the limitation of the current implementation of NHMA.
...
This issue is explained in details in the documentation.

Won't Fix

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created May 28, 2009 at 3:20 PM
Updated October 22, 2009 at 5:10 PM
Resolved October 22, 2009 at 5:10 PM
Who's Looking?