fluentnhibernate ManyToMany does not add records to the junction table
- by Bertvan
When saving my many-to-many related entities, the entities are saved ok. However the junction table stays empty:
Mapping on Product side (ProductMap.cs)
HasManyToMany(x = x.Pictures)
.Table("Product_Picture")
.ParentKeyColumn("Product")
.ChildKeyColumn("Picture")
.Cascade.All()
.Inverse()
Mapping on Picture side (PictureMap.cs)
HasManyToMany(x = x.Products)
.Table("Product_Picture")
.ParentKeyColumn("Picture")
.ChildKeyColumn("Product")
.Cascade.All();
Any ideas?
(btw i can't seem to get the code formatting to work, my 4 spaces are there !)