{"action":"created","issue":{"url":"https://api.github.com/repos/Catel/Catel/issues/1166","repository_url":"https://api.github.com/repos/Catel/Catel","labels_url":"https://api.github.com/repos/Catel/Catel/issues/1166/labels{/name}","comments_url":"https://api.github.com/repos/Catel/Catel/issues/1166/comments","events_url":"https://api.github.com/repos/Catel/Catel/issues/1166/events","html_url":"https://github.com/Catel/Catel/issues/1166","id":303471756,"number":1166,"title":"Nesting with ChildAwareModelBase does not support more than one layer","user":{"login":"mennodeij","id":1713187,"avatar_url":"https://avatars3.githubusercontent.com/u/1713187?v=4","gravatar_id":"","url":"https://api.github.com/users/mennodeij","html_url":"https://github.com/mennodeij","followers_url":"https://api.github.com/users/mennodeij/followers","following_url":"https://api.github.com/users/mennodeij/following{/other_user}","gists_url":"https://api.github.com/users/mennodeij/gists{/gist_id}","starred_url":"https://api.github.com/users/mennodeij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mennodeij/subscriptions","organizations_url":"https://api.github.com/users/mennodeij/orgs","repos_url":"https://api.github.com/users/mennodeij/repos","events_url":"https://api.github.com/users/mennodeij/events{/privacy}","received_events_url":"https://api.github.com/users/mennodeij/received_events","type":"User","site_admin":false},"labels":[{"id":582348329,"url":"https://api.github.com/repos/Catel/Catel/labels/improvement","name":"improvement","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"GeertvanHorrik","id":1246444,"avatar_url":"https://avatars0.githubusercontent.com/u/1246444?v=4","gravatar_id":"","url":"https://api.github.com/users/GeertvanHorrik","html_url":"https://github.com/GeertvanHorrik","followers_url":"https://api.github.com/users/GeertvanHorrik/followers","following_url":"https://api.github.com/users/GeertvanHorrik/following{/other_user}","gists_url":"https://api.github.com/users/GeertvanHorrik/gists{/gist_id}","starred_url":"https://api.github.com/users/GeertvanHorrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeertvanHorrik/subscriptions","organizations_url":"https://api.github.com/users/GeertvanHorrik/orgs","repos_url":"https://api.github.com/users/GeertvanHorrik/repos","events_url":"https://api.github.com/users/GeertvanHorrik/events{/privacy}","received_events_url":"https://api.github.com/users/GeertvanHorrik/received_events","type":"User","site_admin":false},"assignees":[{"login":"GeertvanHorrik","id":1246444,"avatar_url":"https://avatars0.githubusercontent.com/u/1246444?v=4","gravatar_id":"","url":"https://api.github.com/users/GeertvanHorrik","html_url":"https://github.com/GeertvanHorrik","followers_url":"https://api.github.com/users/GeertvanHorrik/followers","following_url":"https://api.github.com/users/GeertvanHorrik/following{/other_user}","gists_url":"https://api.github.com/users/GeertvanHorrik/gists{/gist_id}","starred_url":"https://api.github.com/users/GeertvanHorrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeertvanHorrik/subscriptions","organizations_url":"https://api.github.com/users/GeertvanHorrik/orgs","repos_url":"https://api.github.com/users/GeertvanHorrik/repos","events_url":"https://api.github.com/users/GeertvanHorrik/events{/privacy}","received_events_url":"https://api.github.com/users/GeertvanHorrik/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Catel/Catel/milestones/28","html_url":"https://github.com/Catel/Catel/milestone/28","labels_url":"https://api.github.com/repos/Catel/Catel/milestones/28/labels","id":2760838,"number":28,"title":"5.4.0","description":null,"creator":{"login":"GeertvanHorrik","id":1246444,"avatar_url":"https://avatars0.githubusercontent.com/u/1246444?v=4","gravatar_id":"","url":"https://api.github.com/users/GeertvanHorrik","html_url":"https://github.com/GeertvanHorrik","followers_url":"https://api.github.com/users/GeertvanHorrik/followers","following_url":"https://api.github.com/users/GeertvanHorrik/following{/other_user}","gists_url":"https://api.github.com/users/GeertvanHorrik/gists{/gist_id}","starred_url":"https://api.github.com/users/GeertvanHorrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeertvanHorrik/subscriptions","organizations_url":"https://api.github.com/users/GeertvanHorrik/orgs","repos_url":"https://api.github.com/users/GeertvanHorrik/repos","events_url":"https://api.github.com/users/GeertvanHorrik/events{/privacy}","received_events_url":"https://api.github.com/users/GeertvanHorrik/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":3,"state":"open","created_at":"2017-09-12T17:55:35Z","updated_at":"2018-03-08T15:41:47Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-03-08T13:02:02Z","updated_at":"2018-03-08T15:44:49Z","closed_at":"2018-03-08T15:41:47Z","author_association":"CONTRIBUTOR","body":"When I run the unit test pasted below, the top level 'GrandParent' is not set to IsDirty=true when the child is changed. I would expect this to happen.\r\n\r\n### Steps to reproduce\r\n\r\n    public class GrandParent : ChildAwareModelBase\r\n    {\r\n      public void ResetIsDirty()\r\n      {\r\n        IsDirty = false;\r\n\r\n      }\r\n      public ObservableCollection<Parent> Children\r\n      {\r\n        get { return GetValue<ObservableCollection<Parent>>(ChildrenProperty); }\r\n        set { SetValue(ChildrenProperty, value); }\r\n      }\r\n\r\n      public static readonly PropertyData ChildrenProperty = RegisterProperty(nameof(Children), typeof(ObservableCollection<Parent>), () => new ObservableCollection<Parent>());\r\n    }\r\n\r\n    public class Parent : ChildAwareModelBase\r\n    {\r\n      public void ResetIsDirty()\r\n      {\r\n        IsDirty = false;\r\n\r\n      }\r\n      public ObservableCollection<Child> Children\r\n      {\r\n        get { return GetValue<ObservableCollection<Child>>(ChildrenProperty); }\r\n        set { SetValue(ChildrenProperty, value); }\r\n      }\r\n\r\n      public static readonly PropertyData ChildrenProperty = RegisterProperty(nameof(Children), typeof(ObservableCollection<Child>), () => new ObservableCollection<Child>());\r\n    }\r\n\r\n    public class Child : ChildAwareModelBase\r\n    {\r\n      public void ResetIsDirty()\r\n      {\r\n        IsDirty = false;\r\n\r\n      }\r\n\r\n      public string Name\r\n      {\r\n        get { return GetValue<string>(NameProperty); }\r\n        set { SetValue(NameProperty, value); }\r\n      }\r\n\r\n      public static readonly PropertyData NameProperty = RegisterProperty(nameof(Name), typeof(string), null);\r\n\r\n    }\r\n\r\n    [TestFixture]\r\n    class NestedChildAwareTest\r\n    {\r\n      [Test]\r\n      public void TestNestedIsDirty()\r\n      {\r\n        var g = new GrandParent();\r\n        var p = new Parent();\r\n        var c = new Child();\r\n        g.Children.Add(p);\r\n        p.Children.Add(c);\r\n\r\n        c.ResetIsDirty();\r\n        p.ResetIsDirty();\r\n        g.ResetIsDirty();\r\n\r\n        Assert.IsFalse(c.IsDirty);\r\n        Assert.IsFalse(p.IsDirty);\r\n        Assert.IsFalse(g.IsDirty);\r\n\r\n        c.Name = \"Pietje\";\r\n        Assert.IsTrue(c.IsDirty);\r\n        Assert.IsTrue(p.IsDirty);\r\n        Assert.IsTrue(g.IsDirty); // THIS FAILS\r\n\r\n      }\r\n    }\r\n\r\nPlatform: Windows\r\n.NET version: 4.6\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Catel/Catel/issues/comments/371526695","html_url":"https://github.com/Catel/Catel/issues/1166#issuecomment-371526695","issue_url":"https://api.github.com/repos/Catel/Catel/issues/1166","id":371526695,"user":{"login":"GeertvanHorrik","id":1246444,"avatar_url":"https://avatars0.githubusercontent.com/u/1246444?v=4","gravatar_id":"","url":"https://api.github.com/users/GeertvanHorrik","html_url":"https://github.com/GeertvanHorrik","followers_url":"https://api.github.com/users/GeertvanHorrik/followers","following_url":"https://api.github.com/users/GeertvanHorrik/following{/other_user}","gists_url":"https://api.github.com/users/GeertvanHorrik/gists{/gist_id}","starred_url":"https://api.github.com/users/GeertvanHorrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeertvanHorrik/subscriptions","organizations_url":"https://api.github.com/users/GeertvanHorrik/orgs","repos_url":"https://api.github.com/users/GeertvanHorrik/repos","events_url":"https://api.github.com/users/GeertvanHorrik/events{/privacy}","received_events_url":"https://api.github.com/users/GeertvanHorrik/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T15:44:49Z","updated_at":"2018-03-08T15:44:49Z","author_association":"OWNER","body":"We'll release a new alpha on MyGet later today so you can use this fix."}}
{"actor":{"display_login":"GeertvanHorrik"}}