Hi ,
how to map Parent -> Child -> Grandchild mapping using Fluent NHibernate - TablePerSubclass approach. Please find below details as follows.
Table tblA1: [columns : Id(PK : Identity Column), Description, Name ] // one to many relationship with tblB
Table tblA2: [columns : Id(PK : Identity Column), Comments, Instructions] // one to many relationship with tblB
//ManytoOne relationship with tblA1 and tblA2 //OnetoOne relationship with tblC Table tblB: [Columns : Id (Identity and PK) , tblA1Id(Foreignkey of Id in tblA1),tblA2Id(Foreignkey of Id in tblA2),col3Id(FK - MasterData), col4Id(FK -MasterData)
//OnetoOne relationship with tblB Table tblC [Columns: Id(FK of TBlB) , Value]
I am able to save the data in tblB and tblc using TablePersubclass apporach.
How to map the tblA1 and tblA2 with tblB using fluent nhibernate ? Can we acheive this using TablePerSubclass approach ?
tblA1 and tblA2 entities are not mandatory, Only for exceptional cases, we need to add data in tblA1 or in tblA2 tables. so, By default we are setting the value as 0 for normal scenarios.
Please help me out how to acheive this using fluent Nhibernate
Thanks in Advance, bskumar645
|