|
|
Save entity, attached to collection, modify entity = collection not dirty - make sense?
-
05-02-2008, 6:44 PM |
-
sklett
-
-
-
Joined on 02-11-2007
-
Orange, Ca
-
Posts 264
-
-
|
Save entity, attached to collection, modify entity = collection not dirty - make sense?
I'm in the very early stages of finding a bug in my application. While hunting I noticed something a little strange; - If I new up an entity as a standalone
- set it's properties
- save (as standalone)
- attach to an existing collection
- get a reference to the entity that has been added to the collection
- change properties
the collections IsDirty property remains false. I haven't done any exhaustive testing yet, but it does seem to be the case. Before I spend 2 hours proving (or disproving) this with a simple example can anyone chime in if they have experienced this or if the ES guys can imagine how this might be possible?
|
|
-
05-02-2008, 7:34 PM |
-
sklett
-
-
-
Joined on 02-11-2007
-
Orange, Ca
-
Posts 264
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
I banged out a quick test application and can't reproduce the problem. This is very strange, I can't imagine under what circumstances I could modify an object in the collection and have the collection still think it's not dirty. This only happens with the object that I add to the collection by calling AttachEntity(). Can you guys think of anything at all that I could try?
|
|
-
05-02-2008, 7:34 PM |
-
Mike.Griffin
-
-
-
Joined on 01-14-2007
-
Indianapolis
-
Posts 2,829
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
I would say you have probably found a bug, I will unit test it this weekend and get a fix in ES2008 if it turns out to be a bug. AttachEntity is not as simple as it sounds, it has to add it's row to the main DataTables and such, we must have missed something in there as far a the dirty flags goes.
EntitySpaces | Twitter | BLOG | Please honor our Software License
|
|
-
05-02-2008, 7:53 PM |
-
sklett
-
-
-
Joined on 02-11-2007
-
Orange, Ca
-
Posts 264
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
Mike, did you see that I *could not* reproduce the problem? I would agree, it would be a bug if I could reproduce it, but....
|
|
-
08-13-2008, 7:45 AM |
-
sklett
-
-
-
Joined on 02-11-2007
-
Orange, Ca
-
Posts 264
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
I'm back. I had left this issue alone to move on to other things but it's now under the spotlight again as other people have noticed it here in the office. What can we do to work on this?
|
|
-
08-13-2008, 11:43 AM |
|
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
Have you been able to reproduce it in your test app, yet? Do you see any commonality in the code where it occurs vs. code where it does not?
David Neal Parsons www.entityspaces.net
|
|
-
09-09-2008, 9:28 PM |
-
sklett
-
-
-
Joined on 02-11-2007
-
Orange, Ca
-
Posts 264
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
David.Parsons:Have you been able to reproduce it in your test app, yet? Do you see any commonality in the code where it occurs vs. code where it does not?
I haven't been able to reproduce in the test app and I completely realize how important it is that I do. I will take another stab (duplicate entire project and start ripping it down) at getting a reproducible and sharable app for your review. As a temp workaround I added a "Reload Data" button which will allow my users to keep working without restarting the application. It's better than crashes! 
|
|
-
09-10-2008, 5:49 AM |
|
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
Before you spend a lot of time trying to reproduce an intermittent error in an older version of ES, you should be aware that in the latest beta versions, there has been significant refactoring of Core and all providers. This has improved performance on saves significantly. It also affects, internally, how we handle the ModifiedColumns collection, IsDirty, and RowState. In fact, in addition to the regression tests we had, we added an entire TestFixture devoted to integration tests that test the status of those properties under a variety of conditions (adds, updates, deletes, RejectChanges, etc.), and combinations of conditions for both entities and collections.
David Neal Parsons www.entityspaces.net
|
|
-
09-10-2008, 6:28 AM |
-
Mike.Griffin
-
-
-
Joined on 01-14-2007
-
Indianapolis
-
Posts 2,829
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
Definitely agree with David, the new version (beta) is smokin' fast and the IsDirty logic has been totally redone.
EntitySpaces | Twitter | BLOG | Please honor our Software License
|
|
-
09-10-2008, 6:37 AM |
-
sklett
-
-
-
Joined on 02-11-2007
-
Orange, Ca
-
Posts 264
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
OK guys, I'll give the new version a shot before spending time on a test application, thanks for letting me know things are improved. Is this a beta version you are referring to or the 2008 release?
|
|
-
09-10-2008, 7:13 AM |
-
Mike.Griffin
-
-
-
Joined on 01-14-2007
-
Indianapolis
-
Posts 2,829
-
-
|
Re: Save entity, attached to collection, modify entity = collection not dirty - make sense?
Grab the latest beta, another one will be out in a few days, we're almost at the final release of this maintenance release.
EntitySpaces | Twitter | BLOG | Please honor our Software License
|
|
|
|
|