{"action":"created","issue":{"url":"https://api.github.com/repos/stonecircle/express-autoroute-json/issues/17","repository_url":"https://api.github.com/repos/stonecircle/express-autoroute-json","labels_url":"https://api.github.com/repos/stonecircle/express-autoroute-json/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/stonecircle/express-autoroute-json/issues/17/comments","events_url":"https://api.github.com/repos/stonecircle/express-autoroute-json/issues/17/events","html_url":"https://github.com/stonecircle/express-autoroute-json/issues/17","id":190846061,"node_id":"MDU6SXNzdWUxOTA4NDYwNjE=","number":17,"title":"Make sure one-to-many relationships work automatically","user":{"login":"mansona","id":594890,"node_id":"MDQ6VXNlcjU5NDg5MA==","avatar_url":"https://avatars1.githubusercontent.com/u/594890?v=4","gravatar_id":"","url":"https://api.github.com/users/mansona","html_url":"https://github.com/mansona","followers_url":"https://api.github.com/users/mansona/followers","following_url":"https://api.github.com/users/mansona/following{/other_user}","gists_url":"https://api.github.com/users/mansona/gists{/gist_id}","starred_url":"https://api.github.com/users/mansona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mansona/subscriptions","organizations_url":"https://api.github.com/users/mansona/orgs","repos_url":"https://api.github.com/users/mansona/repos","events_url":"https://api.github.com/users/mansona/events{/privacy}","received_events_url":"https://api.github.com/users/mansona/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-21T21:52:23Z","updated_at":"2018-11-29T13:48:09Z","closed_at":null,"author_association":"CONTRIBUTOR","body":""},"comment":{"url":"https://api.github.com/repos/stonecircle/express-autoroute-json/issues/comments/442839326","html_url":"https://github.com/stonecircle/express-autoroute-json/issues/17#issuecomment-442839326","issue_url":"https://api.github.com/repos/stonecircle/express-autoroute-json/issues/17","id":442839326,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjgzOTMyNg==","user":{"login":"Redsandro","id":1702193,"node_id":"MDQ6VXNlcjE3MDIxOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1702193?v=4","gravatar_id":"","url":"https://api.github.com/users/Redsandro","html_url":"https://github.com/Redsandro","followers_url":"https://api.github.com/users/Redsandro/followers","following_url":"https://api.github.com/users/Redsandro/following{/other_user}","gists_url":"https://api.github.com/users/Redsandro/gists{/gist_id}","starred_url":"https://api.github.com/users/Redsandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redsandro/subscriptions","organizations_url":"https://api.github.com/users/Redsandro/orgs","repos_url":"https://api.github.com/users/Redsandro/repos","events_url":"https://api.github.com/users/Redsandro/events{/privacy}","received_events_url":"https://api.github.com/users/Redsandro/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T13:48:09Z","updated_at":"2018-11-29T13:48:09Z","author_association":"NONE","body":"I read that documentation too. :sunglasses: \r\n\r\nLet me try to explain my confusion. Please keep in mind that I'm new to `mongoose`. Read a lot of the docs, but I might not fully understand the concepts.\r\n\r\nA \"normal\" `mongoose` Model has the schema of subdocuments within the document schema. When you store a document with subdocuments to `mongodb`, you store _one_ document with subdocuments _embedded_.\r\n\r\nIn JSON:API, the relationships are pointers to separate documents of a different _type_ This is not a Mongoose concept.\r\n\r\nWith a JSON:API client, I would store the (to-be-relationship) (sub)documents first, fetch their IDs, and then store the main document with the subdocument IDs as a relationship.\r\n\r\nI can manually invent a Mongoose representation for JSON:API, but `express-autoroute-json` probably already decided how it wants to represent relationships in Mongoose data. I either need to recreate this exactly, or use the same function internally as what a client-request would trigger."}}
{"actor":{"display_login":"Redsandro"}}