Hello,

I have this chain of entities:


*public class EntityRoleAccessDistributed : BaseRoleAccessDistributed*
*{*
*    public virtual DepartmentRoleDistributed Role { get; set; }*
*}*

*public abstract class BaseRoleAccessDistributed : BaseClassDistributed*
*{*
*    public virtual EntityDistributed Entity { get; set; }*
*    public virtual AccessGroupDistributed AccessGroup { get; set; }*
*}*

*public abstract class BaseClassDistributed : 
IEquatable<BaseClassDistributed>, IEqualityComparer<BaseClassDistributed>*
*{*
*    private Tracking _tracking;*

*    public virtual Guid Id { get; set; }*
*}*

And this mappings by code definitions:

*public class EntityRoleAccessDistributedMap : 
ClassMapping<EntityRoleAccessDistributed>*
*{*
*    public EntityRoleAccessDistributedMap()*
*    {*
*        DiscriminatorValue(0);*
*        ManyToOne(x => x.Role, map => map.Column("RoleId"));*
*    }*
*}*

*public class BaseRoleAccessDistributedMap : 
ClassMapping<BaseRoleAccessDistributed>*
*{*
*   public BaseRoleAccessDistributedMap()*
*   {*
*       Table("EntityRoleAccess");*
*        Discriminator(x => x.Column("RoleType"));*
*        DiscriminatorValue(-1);*
*        Id(x => x.Id, map => map.Column("EntityRoleAccessId"));*
*    }*
*}*

When access the system is returned the following error message:

*Ambiguous mapping of EntityRoleAccessDistributed. It was registered with 
more than one class-hierarchy strategy*

Is there a problem with the mapping? I still can not find the problem with 
this mapping with inheritance.

If anyone can help I will be grateful

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to