{"action":"created","issue":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/567","repository_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/567/labels{/name}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/567/comments","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/567/events","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/567","id":132949791,"number":567,"title":"Include hasMany with fixtures does not seem to work","user":{"login":"topaxi","id":213788,"avatar_url":"https://avatars.githubusercontent.com/u/213788?v=3","gravatar_id":"","url":"https://api.github.com/users/topaxi","html_url":"https://github.com/topaxi","followers_url":"https://api.github.com/users/topaxi/followers","following_url":"https://api.github.com/users/topaxi/following{/other_user}","gists_url":"https://api.github.com/users/topaxi/gists{/gist_id}","starred_url":"https://api.github.com/users/topaxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topaxi/subscriptions","organizations_url":"https://api.github.com/users/topaxi/orgs","repos_url":"https://api.github.com/users/topaxi/repos","events_url":"https://api.github.com/users/topaxi/events{/privacy}","received_events_url":"https://api.github.com/users/topaxi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-11T11:39:48Z","updated_at":"2016-03-21T12:16:16Z","closed_at":"2016-03-21T12:16:15Z","body":"I have something similar to:\r\n\r\n`mirage/models/user.js`:\r\n```js\r\nimport { Model, hasMany } from 'ember-cli-mirage'\r\n\r\nexport default Model.extend({\r\n  comments: hasMany('text')\r\n})\r\n```\r\n\r\n`mirage/models/text.js`:\r\n```js\r\nimport { Model, belongsTo } from 'ember-cli-mirage'\r\n\r\nexport default Model.extend({\r\n  author: belongsTo('user')\r\n})\r\n```\r\n\r\n`mirage/fixtures/user.js`:\r\n```js\r\nexport default [\r\n  { id: 1, username: 'topaxi' }\r\n]\r\n```\r\n\r\n`mirage/fixtures/texts.js`:\r\n```js\r\nexport default [\r\n  { id: 1, content: 'foo', authorId: 1 },\r\n  { id: 2, content: 'bar', authorId: 1 },\r\n  { id: 3, content: 'baz', authorId: 1 }\r\n]\r\n```\r\n\r\n`mirage/scenarios/default.js`:\r\n```js\r\nexport default (server) => {\r\n  server.loadFixtures('users')\r\n  server.loadFixtures('texts')\r\n}\r\n```\r\n\r\n`mirage/config.js`:\r\n```js\r\nexport default () => {\r\n  this.namespace = 'api/v1'\r\n\r\n  this.get('/v1/users')\r\n}\r\n```\r\n\r\nNow if I'm requesting `/api/v1/users/1?include=comments`, I will only get the user without any comments/texts included.\r\nI'm not sure if I'm doing something wrong.\r\nShould I specify the one-to-many relationship only once?\r\nDo the one-to-many includes only work if I create the models / objects by hand?"},"comment":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments/199247072","html_url":"https://github.com/samselikoff/ember-cli-mirage/issues/567#issuecomment-199247072","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/567","id":199247072,"user":{"login":"topaxi","id":213788,"avatar_url":"https://avatars.githubusercontent.com/u/213788?v=3","gravatar_id":"","url":"https://api.github.com/users/topaxi","html_url":"https://github.com/topaxi","followers_url":"https://api.github.com/users/topaxi/followers","following_url":"https://api.github.com/users/topaxi/following{/other_user}","gists_url":"https://api.github.com/users/topaxi/gists{/gist_id}","starred_url":"https://api.github.com/users/topaxi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topaxi/subscriptions","organizations_url":"https://api.github.com/users/topaxi/orgs","repos_url":"https://api.github.com/users/topaxi/repos","events_url":"https://api.github.com/users/topaxi/events{/privacy}","received_events_url":"https://api.github.com/users/topaxi/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T12:16:15Z","updated_at":"2016-03-21T12:16:15Z","body":"It now works with `ember-cli-mirage#master`, thanks!"}}