I've been trying to use #harp architecture and Fluent-NHibernate. I am trying to sublass off of SharpArch.Core.DomainModel.Entity since I have some entities in my domain model that must have a unique name.
public abstract class UniqueNamedEntity : Entity
{
protected UniqueNamedEntity() {
}
protected UniqueNamedEntity(string uniqueName) {
Check.Require(!string.IsNullOrEmpty(uniqueName) && uniqueName.Trim() != String.Empty,
"The unique name must be provided");
UniqueName = uniqueName;
}
[DomainSignature]
[NotNull, NotEmpty]
public virtual string UniqueName { get; protected set; }
}
When I try to map this using the Fluent Nhibernate AutoMap classes I get the following error: Object of type 'FluentNHibernate.AutoMap.AutoMap1[Assembly.SomeSubclassOfUniqueNamedEntity]' cannot be converted to type 'FluentNHibernate.AutoMap.AutoMap
1[Assembly.UniqueNamedEntity]'.
I've tried setting the SomeSubclassOfUniqueNamedEntityMap class to subclass off of UniqueNamedEntityMap, but that doesn't work. If anyone has anythoughts that would be great.