{"action":"closed","issue":{"url":"https://api.github.com/repos/formly-js/angular-formly/issues/614","labels_url":"https://api.github.com/repos/formly-js/angular-formly/issues/614/labels{/name}","comments_url":"https://api.github.com/repos/formly-js/angular-formly/issues/614/comments","events_url":"https://api.github.com/repos/formly-js/angular-formly/issues/614/events","html_url":"https://github.com/formly-js/angular-formly/issues/614","id":128050370,"number":614,"title":"Initially null vs empty object for field groups","user":{"login":"koraybalci","id":1880390,"avatar_url":"https://avatars.githubusercontent.com/u/1880390?v=3","gravatar_id":"","url":"https://api.github.com/users/koraybalci","html_url":"https://github.com/koraybalci","followers_url":"https://api.github.com/users/koraybalci/followers","following_url":"https://api.github.com/users/koraybalci/following{/other_user}","gists_url":"https://api.github.com/users/koraybalci/gists{/gist_id}","starred_url":"https://api.github.com/users/koraybalci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koraybalci/subscriptions","organizations_url":"https://api.github.com/users/koraybalci/orgs","repos_url":"https://api.github.com/users/koraybalci/repos","events_url":"https://api.github.com/users/koraybalci/events{/privacy}","received_events_url":"https://api.github.com/users/koraybalci/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-01-22T00:02:27Z","updated_at":"2016-01-26T23:49:13Z","closed_at":"2016-01-26T23:49:13Z","body":"I have formly field with a fieldGroup inside (like a sub form of some sort). the field is tied to model via key and everything is playing almost nicely. However, the initial (untouched) value of the key object is not null but empty object {}, which is set by formly I presume.\r\n\r\nNot sure if this is a bug or sth by design, but when things are nested and json is sent to server over the wire, those empty objects become empty entities on server side which can create all sorts of problems. I can manually go over the objects (recursively) in the model and nullify them but I suppose if they were initially null, that would be much cleaner.\r\n\r\nI also can't set defaultValue to null for fields with fieldGroups, if that makes sense.\r\n\r\nNot sure if what I am asking is even possible but can formly set these objects to null initially (instead of empty objects)?\r\n\r\nI hope I am not missing sth."}}