Hello,
I have a question about cascading. It is about a one to many relationship between Word and WordExpression. In the mapping file the cascade for the bag is set to save-update.
This code works just fine:
Code:
Word word = new Word();
word.Catalogue = "My new word";
word.Subject = new Subject(3);
WordExpression wordExpression = new WordExpression();
wordExpression.Catalogue = "Some expression #1 for new word";
wordExpression.Word = word;
word.WordExpressions.Add(wordExpression);
NHDataManager.Save(word, exchangeContext);
How can I avoid the assignment?
wordExpression.Word = word;
I thought NHibernate knows that fact because of the mapping file. Do I really have to assign for each new WordExpression the word manually or did I just missed some points here?
Thx 4 any help.