Here is my post on stackoverflow
http://stackoverflow.com/posts/15854813/edit
Here I duplicate text of my message.
I create some mapping
public class ComplexMapping:ClassMap<Complex>
{
public ComplexMapping()
{
Table("ComplexTable");
Id(comp => comp.Id,"ComplexId").GeneratedBy.Identity();
Map(comp => comp.Name,"Name").Not.Nullable();
Map(comp => comp.Subscribe, "DescriptionComplex");
HasManyToMany(comp =>
comp.ScrollOfDish).Table("ComplexDish").ParentKeyColumn("ComplexId").ChildKeyColumn("DishId").Cascade.All();
}
}
public class DishMapping:ClassMap<Dish>
{
public DishMapping()
{
Table("DishTable");
Id(dish => dish.Id, "DishId").GeneratedBy.Identity();
Map(dish => dish.Name);
Map(dish => dish.Description);
Map(dish => dish.Price);
References(x => x.Category, "CategoryId").Cascade.None();
HasManyToMany(comp =>
comp.Scroll).Table("ComplexDish").ParentKeyColumn("DishId").ChildKeyColumn("ComplexId").Inverse();
Here i save my object - with front-end data.
http://i.stack.imgur.com/IZ4Pk.png
And object save but not whole object only name and description have saved
but collection of products doesn't save. I think i forgot some simple thing
please help me.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.