Query regarding the Nhibernate many to many mapping
Posted
by Pramod
on Stack Overflow
See other posts from Stack Overflow
or by Pramod
Published on 2010-05-14T06:15:43Z
Indexed on
2010/05/14
6:24 UTC
Read the original article
Hit count: 300
nhibernate-mapping
Hi, I have a requirement where i have 3 dimension tables (employee, project, technology) and a common fact table which has the key id's of all these three tables.
My question goes like this...
How do i create a mapping table (fact table) having these three columns - emp_id, proj_i and tech_i. I know we can achieve this for two tables using the below syntax:
HasManyToMany(x => x.Empl) .Table("Emp_Proj") .ParentKeyColumn("Emp_i") .ChildKeyColumn("Proj_I") .Inverse() .Cascade.All();
How can i add another child key column (tech_i) to the above mapping table?
© Stack Overflow or respective owner