It seems like the following scenario shouldn't be uncommon, but I can't figure out how to handle it in FluenNHibernate:
public class Product: BaseEntity
{
public Product()
{
Categories = new List<Category>();
}
public virtual IList<Category> Categories { get; set; }
...
}
public enum Categories
{
Classic = 1,
Modern = 2,
Trendy = 3,
...
}
So, I need a ProductCategories table that allows me to map one product to many categories, but I don't think NHibernate will handle this unless I have an actual Categories class and a Categories table with a many-to-many relationship specified. There are a number of reasons this is not desirable, not the least of which is that it's overkill.
I'm using AutoMapper - any way I can override to make this work?
Thanks!