NHibernate mapping question. I have an entity called User and an entity called Menu. User contains two collections of menus.
public class User
{
public List<Menu> History {get; set;}
public List<Menu> Favourites {get; set;}
}
public class Menu
{
public string Name {get; set;}
...
}
Is there anyway I could, without creating new entity, generate two relationship tables for User and Menu (UserHistory and UserFavourites probably...), each contains mapping from UserIds to MenuIds? Can it be done with mappings only(FluentNHibernate mapping if possible)? Or is there a better way to do what I am trying to do here?
Thank you.