Dear,
when using Remove() function on my object(I'am sure that my object is not null and has no association with any other objects) it throw NullReferenceException.
Exception message:
Object reference not set to an instance of an object.
Stack trace:
at Xtensive.Storage.Providers.SessionHandler.BuildReferencingQuery(AssociationInfo association)
at Xtensive.Storage.Providers.SessionHandler.<GetReferencesTo>b__38(Object p)
at Xtensive.Threading.ThreadSafeDictionary`2.GetValue(TKey key, Func`2 generator)
at Xtensive.Storage.Providers.SessionHandler.GetReferencesTo(Entity target, AssociationInfo association)
at Xtensive.Orm.ReferenceFinder.GetReferencesTo(Entity target, AssociationInfo association)
at Xtensive.Orm.ReferentialIntegrity.RemovalProcessor.ProcessItems(IList`1 entities)
at Xtensive.Orm.ReferentialIntegrity.RemovalProcessor.Remove(IEnumerable`1 entities)
at Xtensive.Orm.Entity.Remove()
at Microtech.Infinity5.Web.Financial.GL.CostCentersForm.DeleteCostCenter() in D:\Hala\Infinity5-Last\trunk\Source Code\Microtech.Infinity5.Web\Financial\GL\CostCentersForm.aspx.cs:line 270
at Microtech.Infinity5.Web.Financial.GL.CostCentersForm.Delete() in D:\Hala\Infinity5-Last\trunk\Source Code\Microtech.Infinity5.Web\Financial\GL\CostCentersForm.aspx.cs:line 177
at Microtech.Infinity5.Web.UserControls.uc_Navigation.btn_Delete_Click(Object sender, EventArgs e) in D:\Hala\Infinity5-Last\trunk\Source Code\Microtech.Infinity5.Web\UserControls\uc_Navigation.ascx.cs:line 85
at DevExpress.Web.ASPxEditors.ASPxButton.OnClick(EventArgs e)
at DevExpress.Web.ASPxEditors.ASPxButton.RaisePostBackEvent(String eventArgument)
at DevExpress.Web.ASPxClasses.ASPxWebControl.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)*
any help please?????
asked
Apr 05 '11 at 03:48
Hala Aly
7●7●7●9
Hello Hala,
Which exactly version of DataObjects.Net you use? There were some fixes connected with association model in recent builds.
Another question is: are you sure that the persistent type (CostCenter class, if I got it right) is not involved in any associations? What about its ancestors/interfaces?
Is it affordable for you to share a domain model, or at least to build a test case that would reproduce the problem?
Thanks is advance
Dear Dmitri, I use version 4.4, and I add the CostCenter in empty data base(using Recreate option)
Hala,
Good. In addition, I need the exact assembly version (Xtensive.Orm.dll -> Properties -> Details -> File version) and at least the source code of CostCenter class with all persistent types that it references. Until I've got the model, I can't make a test and reproduce the case.
Dear Dmitri, I found why it do that because I have strucure that used my entity and this strucure is not used in any entity
OK, I see. Then I'm closing the question.