nHibernate Envers with Composite Key

Description

Stuck again with Composite Key and its now with Enverse.

It says "Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null is currently not supported in Envers. If you need composite-id, use 'Components as composite identifiers'."

What do you mean by Component as composite identifier now. What should i change to make it work. ???

public class DealDetail {
public virtual Deal Deal { get; set; }
public virtual DealType Type { get; set; }
public virtual int MainTopic { get; set; }

public override bool Equals(object obj) {
if (obj == null)
return false;

DealDetail t = obj as DealDetail;

if (t == null)
return false;

if (t.Deal == Deal && t.Type == Type)
return true;

return false;
}

public override int GetHashCode() {
int hash = 13;

hash += (null == Deal ? 0 : Deal.GetHashCode());
hash += (null == Type ? 0 : Type.GetHashCode());

return hash;
}
}
Mapping here

public class DealDetailMap : ClassMap<DealDetail> {

public DealDetailMap() {
Table("dealtype_m");
CompositeId().KeyReference(x => x.Deal, "deal_id")
.KeyReference(x => x.Type, "deal_type");

Map(x => x.MainTopic, "main_topic").Not.Nullable();
}
}
Help me out with this..

Many Thanks, Su..

Environment

None

Assignee

Unassigned

Reporter

Sukumar

Labels

None

Components

Affects versions

Priority

Trivial
Configure