{"action":"created","issue":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/614","labels_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/614/labels{/name}","comments_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/614/comments","events_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/614/events","html_url":"https://github.com/tgriesser/bookshelf/issues/614","id":57032092,"number":614,"title":"Create a non-existent pivot","user":{"login":"VictorQueiroz","id":5693176,"avatar_url":"https://avatars.githubusercontent.com/u/5693176?v=3","gravatar_id":"","url":"https://api.github.com/users/VictorQueiroz","html_url":"https://github.com/VictorQueiroz","followers_url":"https://api.github.com/users/VictorQueiroz/followers","following_url":"https://api.github.com/users/VictorQueiroz/following{/other_user}","gists_url":"https://api.github.com/users/VictorQueiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorQueiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorQueiroz/subscriptions","organizations_url":"https://api.github.com/users/VictorQueiroz/orgs","repos_url":"https://api.github.com/users/VictorQueiroz/repos","events_url":"https://api.github.com/users/VictorQueiroz/events{/privacy}","received_events_url":"https://api.github.com/users/VictorQueiroz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-09T13:45:21Z","updated_at":"2015-02-09T14:04:18Z","closed_at":null,"body":"How can I create a non-existent pivot? I can update a pivot with `updatePivot` with no problems but if the pivot doesn't exists, I'm dead! Someone can help me, please?"},"comment":{"url":"https://api.github.com/repos/tgriesser/bookshelf/issues/comments/73512917","html_url":"https://github.com/tgriesser/bookshelf/issues/614#issuecomment-73512917","issue_url":"https://api.github.com/repos/tgriesser/bookshelf/issues/614","id":73512917,"user":{"login":"VictorQueiroz","id":5693176,"avatar_url":"https://avatars.githubusercontent.com/u/5693176?v=3","gravatar_id":"","url":"https://api.github.com/users/VictorQueiroz","html_url":"https://github.com/VictorQueiroz","followers_url":"https://api.github.com/users/VictorQueiroz/followers","following_url":"https://api.github.com/users/VictorQueiroz/following{/other_user}","gists_url":"https://api.github.com/users/VictorQueiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorQueiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorQueiroz/subscriptions","organizations_url":"https://api.github.com/users/VictorQueiroz/orgs","repos_url":"https://api.github.com/users/VictorQueiroz/repos","events_url":"https://api.github.com/users/VictorQueiroz/events{/privacy}","received_events_url":"https://api.github.com/users/VictorQueiroz/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T14:04:18Z","updated_at":"2015-02-09T14:04:18Z","body":"Relationship model methods:\r\n```js\r\nreferrer: function () {\r\n\treturn this.hasOne('Account').through('AccountReferrer', 'id', 'referrer_id');\r\n},\r\nreferrals: function () {\r\n\treturn this.belongsToMany('Account', 'account_referrer', 'account_id', 'referrer_id');\r\n},\r\n```\r\n\r\nTable 'accounts':\r\n``` \r\nPrimary key: id\r\n(...)\r\n```\r\n\r\nTable 'account_referrer':\r\n```\r\nPrimary key: id\r\nAccount key: account_id\r\nReferrer key: referrer_id\r\n```"}}