CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

edit level mismatch in CopyState for grand child

rated by 0 users
Not Answered This post has 0 verified answers | 5 Replies | 1 Follower

Top 150 Contributor
56 Posts
fredg posted on Tue, Mar 6 2012 2:08 PM

Hi, i do more investigation on my windows form project. My root object has 1 child, the child has 2 grand children objects.

During loading the windows form, after retrieving root object(no any binding right now),  I did root.BeginEdit(). The 2 grand children has 2 different edit level, i.e. 0 and 1.

Do you have any idea? Is the grand children's problem? Thanks in advance.

All Replies

Top 10 Contributor
1,764 Posts

Could you post the code for us to check/verify the problem?

All the child/grandchild should be on the same EditLevel after BegEdit on the root object.

Is any of the grandchild objects lazy loaded or created by a rule?

Jonny Bekkum, Norway CslaContrib Coordinator

Top 150 Contributor
56 Posts
fredg replied on Tue, Mar 6 2012 3:07 PM

Thanks for your reply. The code is a bit long.

I did more debug. When calling BeginEdit() on grandchild 0 (which has different edit level from root), get "Expression has been evaluated and has no value" error;  when calling BeginEdit() on grandchild1 (which has same edit level as root), get "Edit level mismatch in CopyState" error.

What do you mean "lazy loaded or created by a rule"? i think grandchild is loaded as its parent.

Top 10 Contributor
1,764 Posts

Just trying to find out if both grand children is loaded at the same time in data access or if one may be created from on the client side by a Rule.

Seems like both grandchildren is loaded the data access code (Fetch)?

Jonny Bekkum, Norway CslaContrib Coordinator

Top 150 Contributor
56 Posts
fredg replied on Tue, Mar 6 2012 3:39 PM

I tried 3 grandchildren objects, grandchild 0 has different edit level. other 2 objects seems fine.

Top 150 Contributor
56 Posts
fredg replied on Wed, Mar 7 2012 10:33 AM

All grand children is loaded at the same time in data access. What do you mean "Seems like both grandchildren is loaded the data access code (Fetch)? "?

Page 1 of 1 (6 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems