nHibernate is giving the error : Custom type does not implement
UserCollectionType: myApp.Domain.OrderLineCollection. BindingList
implements IList, so why is nHibernate trying to use
UserCollectionType instead of IList?

public class OrderHeader
{
        public virtual int OrderHeaderId { get; set; }
        public virtual string OrderNumber { get; set; }
        public virtual OrderLineCollection Line { get; set; }
}

public class OrderHeaderCollection : BindingList<OrderHeader> { }

public class OrderHeaderMap : ClassMap<OrderHeader>
{
        public OrderHeaderMap()
        {
            WithTable("Orders");
            Id(x => x.OrderHeaderId, "OrderId").GeneratedBy.Identity();
            Map(x => x.OrderNumber);
            HasMany(x => x.Line).WithKeyColumn("OrderHeaderId").AsList();
        }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to