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%20Aly's gravatar image

Hala Aly
7779

edited Apr 05 '11 at 06:08

Dmitri%20Maximov's gravatar image

Dmitri Maximov
22111211

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

(Apr 05 '11 at 06:18) Dmitri Maximov Dmitri%20Maximov's gravatar image

Dear Dmitri, I use version 4.4, and I add the CostCenter in empty data base(using Recreate option)

(Apr 05 '11 at 07:25) Hala Aly Hala%20Aly's gravatar image

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.

(Apr 05 '11 at 07:31) Dmitri Maximov Dmitri%20Maximov's gravatar image

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

(May 16 '11 at 03:25) Hala Aly Hala%20Aly's gravatar image

OK, I see. Then I'm closing the question.

(May 16 '11 at 04:42) Dmitri Maximov Dmitri%20Maximov's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×7

Asked: Apr 05 '11 at 03:48

Seen: 2,548 times

Last updated: May 16 '11 at 04:42

powered by OSQA