Here's the only code:
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
OrderNote _Note = new OrderNote();
_Note.OrderId = 1;
_Note.NoteType = NoteType.SystemPrivate;
_Note.Comment = "test order note by Joe";
_Note.Save();
}
a different object with the same identifier value was already associated with the session: 17, of entity: CommerceBuilder.Orders.OrderNote
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: NHibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 17, of entity: CommerceBuilder.Orders.OrderNote
Source Error:
Line 15: _Note.NoteType = NoteType.SystemPrivate;
Line 16: _Note.Comment = "test order note by Joe";
Line 17: _Note.Save();
Line 18: }
Line 19: }
Source File: c:\AbleMods-Modules\ReturnsManager-Gold\Site\test-ordernote.aspx.cs Line: 17
Stack Trace:
[NonUniqueObjectException: a different object with the same identifier value was already associated with the session: 17, of entity: CommerceBuilder.Orders.OrderNote]
CommerceBuilder.DomainModel.EntityWithTypedId`1.Save() +636
test_ordernote.Page_Load(Object sender, EventArgs e) in c:\AbleMods-Modules\ReturnsManager-Gold\Site\test-ordernote.aspx.cs:17
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064