{"action":"created","issue":{"url":"https://api.github.com/repos/tonysneed/trackable-entities/issues/81","labels_url":"https://api.github.com/repos/tonysneed/trackable-entities/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/tonysneed/trackable-entities/issues/81/comments","events_url":"https://api.github.com/repos/tonysneed/trackable-entities/issues/81/events","html_url":"https://github.com/tonysneed/trackable-entities/issues/81","id":106629601,"number":81,"title":"Index out of range exception @ ApplyChangesOnCollectionProperties","user":{"login":"trucksmart","id":14081559,"avatar_url":"https://avatars.githubusercontent.com/u/14081559?v=3","gravatar_id":"","url":"https://api.github.com/users/trucksmart","html_url":"https://github.com/trucksmart","followers_url":"https://api.github.com/users/trucksmart/followers","following_url":"https://api.github.com/users/trucksmart/following{/other_user}","gists_url":"https://api.github.com/users/trucksmart/gists{/gist_id}","starred_url":"https://api.github.com/users/trucksmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trucksmart/subscriptions","organizations_url":"https://api.github.com/users/trucksmart/orgs","repos_url":"https://api.github.com/users/trucksmart/repos","events_url":"https://api.github.com/users/trucksmart/events{/privacy}","received_events_url":"https://api.github.com/users/trucksmart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tonysneed/trackable-entities/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-15T19:37:49Z","updated_at":"2015-12-11T10:27:41Z","closed_at":null,"body":"I tried to attach the debugging symbol to investigate myself but couldn't:\r\n\r\nFor some reason when I try to use the `ApplyChanges` extension method I receive an index out of range exception @ `ApplyChangesOnCollectionProperties`.  I have generated client and service entities using the Code First approach.  I can update an entity successfully if I don't touch any relationship properties but as soon as I do I get the exception.  My entities are pretty simple:\r\n\r\n**Service Entities**\r\n\r\n    public class Vehicle : ITrackable, IMergeable\r\n    {\r\n        public Vehicle()\r\n        {\r\n            this.VehiclePictures = new List<VehiclePicture>();\r\n        }\r\n\r\n        public int Id { get; set; }\r\n        public List<VehiclePicture> VehiclePictures { get; set; }\r\n        public TrackingState TrackingState { get; set; }\r\n        public ICollection<string> ModifiedProperties { get; set; }\r\n        public Guid EntityIdentifier { get; set; }\r\n    }\r\n\r\n    public class VehiclePicture : ITrackable, IMergeable\r\n    {\r\n        public int Id { get; set; }\r\n        public string Name { get; set; }\r\n        public int VehicleId { get; set; }\r\n        public Vehicle Vehicle { get; set; }\r\n        public TrackingState TrackingState { get; set; }\r\n        public ICollection<string> ModifiedProperties { get; set; }\r\n        public Guid EntityIdentifier { get; set; }\r\n    }\r\n\r\n**Client Entities**\r\nInherit EntityBase etc.\r\n\r\n**Versions**\r\nTrackable Entities 2.5.2\r\nEntity Framework 6.1.3\r\nASP.NET MVC 5 w/ .NET 4.5\r\nJSON .NET 7.0.1"},"comment":{"url":"https://api.github.com/repos/tonysneed/trackable-entities/issues/comments/163903654","html_url":"https://github.com/tonysneed/trackable-entities/issues/81#issuecomment-163903654","issue_url":"https://api.github.com/repos/tonysneed/trackable-entities/issues/81","id":163903654,"user":{"login":"tonysneed","id":2836367,"avatar_url":"https://avatars.githubusercontent.com/u/2836367?v=3","gravatar_id":"","url":"https://api.github.com/users/tonysneed","html_url":"https://github.com/tonysneed","followers_url":"https://api.github.com/users/tonysneed/followers","following_url":"https://api.github.com/users/tonysneed/following{/other_user}","gists_url":"https://api.github.com/users/tonysneed/gists{/gist_id}","starred_url":"https://api.github.com/users/tonysneed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonysneed/subscriptions","organizations_url":"https://api.github.com/users/tonysneed/orgs","repos_url":"https://api.github.com/users/tonysneed/repos","events_url":"https://api.github.com/users/tonysneed/events{/privacy}","received_events_url":"https://api.github.com/users/tonysneed/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T10:27:41Z","updated_at":"2015-12-11T10:27:41Z","body":"I think what I need in order to replicate your scenario would be the state of entities: Unchanged, Added, Modified or Deleted."}}