How do you easily match a list of components in Nhibernate?
public class Registration : Entity { public virtual IList<InsuranceInformation> InsuranceInformation { get; set; } } public class InsuranceInformation { public virtual Person Insured { get; set; } public virtual string PolicyNumber { get; set; } public virtual string InsuranceCompanyId { get; set; } public virtual string InsuranceCompanyName { get; set; } public virtual string PlanType { get; set; } public virtual string GroupNumber { get; set; } public virtual FamilyRelationships InsuredRelationshipToPatient { get; set; } }
Here, Registration is Entity and InsuranceInformation / Person are components.
If I modify InsuranceInformation to be an entity, I can easily map it to FluentNH Automapper. But when I change InsuranceInformation to a component, it throws a matching exception.
source share