{"action":"created","issue":{"url":"https://api.github.com/repos/OpenRIAServices/TestIssues/issues/52","labels_url":"https://api.github.com/repos/OpenRIAServices/TestIssues/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/OpenRIAServices/TestIssues/issues/52/comments","events_url":"https://api.github.com/repos/OpenRIAServices/TestIssues/issues/52/events","html_url":"https://github.com/OpenRIAServices/TestIssues/issues/52","id":127332735,"number":52,"title":"DomainDataSource stops tracking loaded entities after submit","user":{"login":"STAH","id":2418242,"avatar_url":"https://avatars.githubusercontent.com/u/2418242?v=3","gravatar_id":"","url":"https://api.github.com/users/STAH","html_url":"https://github.com/STAH","followers_url":"https://api.github.com/users/STAH/followers","following_url":"https://api.github.com/users/STAH/following{/other_user}","gists_url":"https://api.github.com/users/STAH/gists{/gist_id}","starred_url":"https://api.github.com/users/STAH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STAH/subscriptions","organizations_url":"https://api.github.com/users/STAH/orgs","repos_url":"https://api.github.com/users/STAH/repos","events_url":"https://api.github.com/users/STAH/events{/privacy}","received_events_url":"https://api.github.com/users/STAH/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenRIAServices/TestIssues/labels/CodePlex","name":"CodePlex","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-18T23:44:45Z","updated_at":"2016-01-18T23:44:46Z","closed_at":null,"body":"<sub>This issue was imported from [CodePlex](http://openriaservices.codeplex.com/workitem/52)</sub>\r\n\r\n**[TDenis](https://github.com/TDenis)** <sup>wrote 2014-09-18 at 09:57</sup>\r\nSteps to reproduce:\r\n\r\n1. Load the data: DomainDataSource.Load\r\n2. Edit any entity\r\n3. DomainDataSource.SubmitChanges\r\n4. Remove any entity using DomainDataSource.DataView.Remove\r\n5. DomainDataSource.RejectChanges\r\n\r\nThe removed entity will not re-appear in the DomainDataSource.DataView. \r\nThe only solution that I found is to reload the data after every submit. But it is not a good idea for large data sets.\r\n\r\n\r\nLooks like the issue is related to the following code:\r\n\r\n```\r\npublic class DomainDataSource : Control\n{\n    . . .\n    private void SubmitChanges_Callback(SubmitOperation submitOperation)\n    {\n        . . .\n        if (!submitOperation.IsCanceled && !submitOperation.HasError)\n        {\n            // When changes are successfully submitted, then we need to clear all page tracking\n            // to prevent entities that were removed from being resurrected as new entities,\n            // and to reset page tracking for added and edited entities.\n            this._internalEntityCollection.ClearPageTracking(true);\n        }\n    }\n}\r\n```\r\nNeed an idea on how to fix the issue without introducing new bugs."},"comment":{"url":"https://api.github.com/repos/OpenRIAServices/TestIssues/issues/comments/172683646","html_url":"https://github.com/OpenRIAServices/TestIssues/issues/52#issuecomment-172683646","issue_url":"https://api.github.com/repos/OpenRIAServices/TestIssues/issues/52","id":172683646,"user":{"login":"STAH","id":2418242,"avatar_url":"https://avatars.githubusercontent.com/u/2418242?v=3","gravatar_id":"","url":"https://api.github.com/users/STAH","html_url":"https://github.com/STAH","followers_url":"https://api.github.com/users/STAH/followers","following_url":"https://api.github.com/users/STAH/following{/other_user}","gists_url":"https://api.github.com/users/STAH/gists{/gist_id}","starred_url":"https://api.github.com/users/STAH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STAH/subscriptions","organizations_url":"https://api.github.com/users/STAH/orgs","repos_url":"https://api.github.com/users/STAH/repos","events_url":"https://api.github.com/users/STAH/events{/privacy}","received_events_url":"https://api.github.com/users/STAH/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T23:44:46Z","updated_at":"2016-01-18T23:44:46Z","body":"**[TDenis](https://github.com/TDenis)** <sup>wrote 2014-10-03 at 21:09</sup>\r\nWell, advanced developers and enterprise perfectionists (in good sense) think that RAD 'smells' and such drag&drop controls should be avoided, that`s true. But I think everything has its purpose, so that`s great that RIA team developed such a simple control that saved a lot of time for us.\r\nI understand that it is not a high-priority issue/feature for lot of experienced people, but if you'll find a time to think about it, that would be great. Maybe some method to re-register cached entities as \"resulting from the last load operation\" (instead of reloading them from the server) or something else.\r\nICollectionView.Refresh doesn`t help unfortunately. I made a test project that can be found here:\r\n[https://github.com/t-denis/dds-test](https://github.com/t-denis/dds-test)\r\n\r\nThanks\r\n"}}