I'm having trouble mapping the following setup in FNH. Any help would be appreciated.
/***** Classes for Item Hierarchy *****/ public class ItemA { public string AProperty { get; set; } } public class ItemB : ItemA { public string BProperty { get; set; } } public class ItemC : ItemB { public string CProperty { get; set; } } public class ItemD : ItemB { public string DProperty { get; set; } } /***** Tables for Item Hierarchy *****/ TABLE A (ItemID INT, ItemTypeID INT, AProperty VARCHAR(100)) TABLE A (ItemID INT, ItemTypeID INT, BProperty VARCHAR(100)) TABLE A (ItemID INT, ItemTypeID INT, CProperty VARCHAR(100)) TABLE A (ItemID INT, ItemTypeID INT, DProperty VARCHAR(100)) /***** ItemTypeID to Class *****/ ItemTypeID = 1 --> ItemA ItemTypeID = 2 --> ItemB ItemTypeID = 3 --> ItemC ItemTypeID = 4 --> ItemD ItemTypeID = 5 --> ItemD /***** ItemTypeID to Table *****/ ItemTypeID = 1 --> Data is in Table A ItemTypeID = 2 --> Data is in Table A Join B ItemTypeID = 3 --> Data is in Table A Join B Join C ItemTypeID = 4 --> Data is in Table A Join B Join D ItemTypeID = 5 --> Data is in Table A Join B Join D I would like to use a Discriminator column (ItemTypeID) but the SubClassMap<ItemD> would have to accept either a value of 4 or 5. Is this possible? -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.