You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A child entity that was temporarily added and then deleted will still be inserted if the parent entity is reattached to a new session.
Bookbook=null;using(vars=OpenSession())using(vartr=s.BeginTransaction()){book=newBook{Id=1};book.Words=newList<Word>{newWord{Id=1,Parent=book}};s.Save(book);tr.Commit();}// Adding temporary child on detached entity.Wordword=newWord{Id=2,Parent=book};book.Words.Add(word);using(vars=OpenSession())using(vartr=s.BeginTransaction()){// Attach entity to new session and remove temporary child.s.Update(book);book.Words.Remove(word);// This produces insert command for removed child.tr.Commit();}
A child entity that was temporarily added and then deleted will still be inserted if the parent entity is reattached to a new session.
Maybe it's a duplicate of #2028
Tests here:
#3666
The text was updated successfully, but these errors were encountered: