fluentnhibernate ManyToMany does not add records to the junction table

Posted by Bertvan on Stack Overflow See other posts from Stack Overflow or by Bertvan
Published on 2010-05-28T13:56:07Z Indexed on 2010/05/28 14:02 UTC
Read the original article Hit count: 350

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 !)

© Stack Overflow or respective owner

Related posts about manytomany

Related posts about fluentnhibernate