Hi all.
I need a help with the mapping of Menu hierarchy in an application. In
my domain I have a class namely Menu:
public class MenuItem : DomainBase
{
public virtual Guid Id { get; set; }
public virtual string Name { get; set; }
public virtual string LinkPage { get; set; }
public virtual IList<Menu> ChildMenuItems { get; set; }
}
In database I have 2 tables namely Menu and MenuParentChildRelation:
Menu (id (PK), name, linkPage)
MenuParentChildRelation (id (PK), parentMenuItemId, childMenuItemId)
parentMenuItemId and childMenuItemId are both referencing to Menu
table. Now I want to map these 2 tables and the relationship to my
domain class Menu. But I dont want a class for MenuParentChildRelation
table in my domain. Instead this relationship should map to
ChildMenuItems property of Menu class. Is this possible with
NHibernate. If yes how?
Thanks in advance.
RK
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---