{"action":"created","issue":{"url":"https://api.github.com/repos/wbyoung/azul/issues/8","labels_url":"https://api.github.com/repos/wbyoung/azul/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/wbyoung/azul/issues/8/comments","events_url":"https://api.github.com/repos/wbyoung/azul/issues/8/events","html_url":"https://github.com/wbyoung/azul/issues/8","id":68206283,"number":8,"title":"Error when adding instances in a many to many relationship","user":{"login":"cocoabythefire","id":657935,"avatar_url":"https://avatars.githubusercontent.com/u/657935?v=3","gravatar_id":"","url":"https://api.github.com/users/cocoabythefire","html_url":"https://github.com/cocoabythefire","followers_url":"https://api.github.com/users/cocoabythefire/followers","following_url":"https://api.github.com/users/cocoabythefire/following{/other_user}","gists_url":"https://api.github.com/users/cocoabythefire/gists{/gist_id}","starred_url":"https://api.github.com/users/cocoabythefire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocoabythefire/subscriptions","organizations_url":"https://api.github.com/users/cocoabythefire/orgs","repos_url":"https://api.github.com/users/cocoabythefire/repos","events_url":"https://api.github.com/users/cocoabythefire/events{/privacy}","received_events_url":"https://api.github.com/users/cocoabythefire/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-13T22:15:56Z","updated_at":"2015-04-15T21:50:26Z","closed_at":"2015-04-14T19:18:58Z","body":"I set up a many to many relationship between two models (List and Places) but when I try to add Places to a list using the following code I get an error:\r\n\r\n```js\r\n   return list1.addPlaces(placeB);\r\n```\r\n\r\n```\r\nError: Could not find source relation ListPlace#places or ListPlace#place for List#places has-many relation\r\n      at module.exports.Mixin.create._throughRelations (/Users/bntarvin/Code/glitter/node_modules/azul/lib/relations/has_many_through.js:146:17)\r\n      at wrapper [as _throughRelations] (/Users/bntarvin/Code/glitter/node_modules/azul/lib/util/class.js:117:19)\r\n      at module.exports.Mixin.create.inverseIsMany (/Users/bntarvin/Code/glitter/node_modules/azul/lib/relations/has_many_through.js:170:33)\r\n      at null.<anonymous> (/Users/bntarvin/Code/glitter/node_modules/azul/lib/relations/has_many_through.js:20:17)\r\n      at wrapper [as inverseIsMany] (/Users/bntarvin/Code/glitter/node_modules/azul/lib/util/class.js:117:19)\r\n      at null.<anonymous> (/Users/bntarvin/Code/glitter/node_modules/azul/lib/relations/has_many_through.js:40:15)\r\n      at null.<anonymous> (/Users/bntarvin/Code/glitter/node_modules/azul/lib/relations/has_many_through.js:20:17)\r\n      at wrapper [as addObjects] (/Users/bntarvin/Code/glitter/node_modules/azul/lib/util/class.js:117:19)\r\n      at null.<anonymous> (/Users/bntarvin/Code/glitter/node_modules/azul/lib/relations/base.js:430:19)\r\n      at wrapper [as addPlaces] (/Users/bntarvin/Code/glitter/node_modules/azul/lib/util/class.js:117:19)\r\n      at BPromise.resolve.then.then.then.then.then.then.then.then.request.url (/Users/bntarvin/Code/glitter/test/list_place_tests.js:78:37)\r\n      at tryCatcher (/Users/bntarvin/Code/glitter/node_modules/bluebird/js/main/util.js:24:31)\r\n      at Promise._settlePromiseFromHandler (/Users/bntarvin/Code/glitter/node_modules/bluebird/js/main/promise.js:454:31)\r\n      at Promise._settlePromiseAt (/Users/bntarvin/Code/glitter/node_modules/bluebird/js/main/promise.js:530:18)\r\n      at Async._drainQueue (/Users/bntarvin/Code/glitter/node_modules/bluebird/js/main/async.js:137:12)\r\n      at Async._drainQueues (/Users/bntarvin/Code/glitter/node_modules/bluebird/js/main/async.js:142:10)\r\n      at Async.drainQueues (/Users/bntarvin/Code/glitter/node_modules/bluebird/js/main/async.js:16:14)\r\n      at process._tickCallback (node.js:419:13)\r\n```"},"comment":{"url":"https://api.github.com/repos/wbyoung/azul/issues/comments/93578977","html_url":"https://github.com/wbyoung/azul/issues/8#issuecomment-93578977","issue_url":"https://api.github.com/repos/wbyoung/azul/issues/8","id":93578977,"user":{"login":"cocoabythefire","id":657935,"avatar_url":"https://avatars.githubusercontent.com/u/657935?v=3","gravatar_id":"","url":"https://api.github.com/users/cocoabythefire","html_url":"https://github.com/cocoabythefire","followers_url":"https://api.github.com/users/cocoabythefire/followers","following_url":"https://api.github.com/users/cocoabythefire/following{/other_user}","gists_url":"https://api.github.com/users/cocoabythefire/gists{/gist_id}","starred_url":"https://api.github.com/users/cocoabythefire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocoabythefire/subscriptions","organizations_url":"https://api.github.com/users/cocoabythefire/orgs","repos_url":"https://api.github.com/users/cocoabythefire/repos","events_url":"https://api.github.com/users/cocoabythefire/events{/privacy}","received_events_url":"https://api.github.com/users/cocoabythefire/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T21:50:26Z","updated_at":"2015-04-15T21:50:26Z","body":"I'm now getting this :(\r\n\r\n```\r\n[error: missing FROM-clause entry for table \"list_places\"]\r\n  cause: \r\n   { [error: missing FROM-clause entry for table \"list_places\"]\r\n     name: 'error',\r\n     length: 115,\r\n     severity: 'ERROR',\r\n     code: '42P01',\r\n     detail: undefined,\r\n     hint: undefined,\r\n     position: '30',\r\n     internalPosition: undefined,\r\n     internalQuery: undefined,\r\n     where: undefined,\r\n     schema: undefined,\r\n     table: undefined,\r\n     column: undefined,\r\n     dataType: undefined,\r\n     constraint: undefined,\r\n     file: 'parse_relation.c',\r\n     line: '2615',\r\n     routine: 'errorMissingRTE' },\r\n  length: 115,\r\n  severity: 'ERROR',\r\n  code: '42P01',\r\n  detail: undefined,\r\n  hint: undefined,\r\n  position: '30',\r\n  internalPosition: undefined,\r\n  internalQuery: undefined,\r\n  where: undefined,\r\n  schema: undefined,\r\n  table: undefined,\r\n  column: undefined,\r\n  dataType: undefined,\r\n  constraint: undefined,\r\n  file: 'parse_relation.c',\r\n  line: '2615',\r\n  routine: 'errorMissingRTE' }\r\n    1) GET /api/lists/2/places with no places\r\n```"}}