{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/197","repository_url":"https://api.github.com/repos/ga-wdi-exercises/project4","labels_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/197/comments","events_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/197/events","html_url":"https://github.com/ga-wdi-exercises/project4/issues/197","id":151640909,"number":197,"title":"Create functionality for embedded object: Name of show does not persist first time around","user":{"login":"cmmovius","id":15206696,"avatar_url":"https://avatars.githubusercontent.com/u/15206696?v=3","gravatar_id":"","url":"https://api.github.com/users/cmmovius","html_url":"https://github.com/cmmovius","followers_url":"https://api.github.com/users/cmmovius/followers","following_url":"https://api.github.com/users/cmmovius/following{/other_user}","gists_url":"https://api.github.com/users/cmmovius/gists{/gist_id}","starred_url":"https://api.github.com/users/cmmovius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmmovius/subscriptions","organizations_url":"https://api.github.com/users/cmmovius/orgs","repos_url":"https://api.github.com/users/cmmovius/repos","events_url":"https://api.github.com/users/cmmovius/events{/privacy}","received_events_url":"https://api.github.com/users/cmmovius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-28T13:27:37Z","updated_at":"2016-04-28T15:53:22Z","closed_at":null,"body":"Link to `app.js` file: https://github.com/cmmovius/playbill-dc/blob/tags/public/js/app.js\r\n\r\nI am working on CRUD functionality for my shows, which are embedded objects within theaters. What I am doing is creating a new blank object, and then the user can edit the blank object with a form to add the information about the show.\r\n\r\nWhen I do this:\r\n```\r\nvm.addShow = function(){\r\n      vm.theater.shows.push(Object.create(Object.prototype));\r\n      vm.update();\r\n    };\r\n```\r\nIt creates a totally blank object that the user can edit. Every entry on the form can be edited and the information persists upon page refreshes. However, I wanted to do this:\r\n```\r\nvm.addShow = function(){\r\n      vm.theater.shows.push(Object.create(Object.prototype, {\r\n        name: {writable: true, value: 'Edit Me to Add a Show!'}\r\n      }));\r\n      vm.update();\r\n    };\r\n```\r\nSo the user would know that they need to then edit the blank object to create the show. However, the first time they replace the `value` with the proper title it does _not_ persist in the database and the `show.name` is blank upon a page refresh. Yet when they add in a `show.name` a second time, that stays in the DB and persists upon refreshes.\r\n\r\nSuggestions?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/comments/215474977","html_url":"https://github.com/ga-wdi-exercises/project4/issues/197#issuecomment-215474977","issue_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/197","id":215474977,"user":{"login":"cmmovius","id":15206696,"avatar_url":"https://avatars.githubusercontent.com/u/15206696?v=3","gravatar_id":"","url":"https://api.github.com/users/cmmovius","html_url":"https://github.com/cmmovius","followers_url":"https://api.github.com/users/cmmovius/followers","following_url":"https://api.github.com/users/cmmovius/following{/other_user}","gists_url":"https://api.github.com/users/cmmovius/gists{/gist_id}","starred_url":"https://api.github.com/users/cmmovius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmmovius/subscriptions","organizations_url":"https://api.github.com/users/cmmovius/orgs","repos_url":"https://api.github.com/users/cmmovius/repos","events_url":"https://api.github.com/users/cmmovius/events{/privacy}","received_events_url":"https://api.github.com/users/cmmovius/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T15:53:22Z","updated_at":"2016-04-28T15:53:22Z","body":"That is the syntax that I found online on how to create an empty object."}}