{"action":"created","issue":{"url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/issues/3","labels_url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/issues/3/comments","events_url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/issues/3/events","html_url":"https://github.com/Glavin001/sails-multitenancy-example/issues/3","id":55358130,"number":3,"title":"Cannot read property 'joins' of undefined","user":{"login":"chipgata","id":9260537,"avatar_url":"https://avatars.githubusercontent.com/u/9260537?v=3","gravatar_id":"","url":"https://api.github.com/users/chipgata","html_url":"https://github.com/chipgata","followers_url":"https://api.github.com/users/chipgata/followers","following_url":"https://api.github.com/users/chipgata/following{/other_user}","gists_url":"https://api.github.com/users/chipgata/gists{/gist_id}","starred_url":"https://api.github.com/users/chipgata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chipgata/subscriptions","organizations_url":"https://api.github.com/users/chipgata/orgs","repos_url":"https://api.github.com/users/chipgata/repos","events_url":"https://api.github.com/users/chipgata/events{/privacy}","received_events_url":"https://api.github.com/users/chipgata/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-01-24T04:08:44Z","updated_at":"2015-05-25T01:37:01Z","closed_at":null,"body":"Hi you!\r\n\r\nI made the following on my code:\r\n```\r\n Game\r\n    .tenant(req.session.tenant)\r\n    .find({}).populate('developer').exec(function findCB(err,found){\r\n        res.view({\r\n          title: \"Game Management\",\r\n          data : found,\r\n          errors    : req.flash('error')\r\n        });\r\n    });\r\n```\r\n\r\nI get errors:\r\n```\r\nerror: Sending 500 (\"Server Error\") response: \r\n TypeError: Cannot read property 'joins' of undefined\r\n    at _createParentOperation (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:255:15)\r\n    at _stageOperations (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:171:39)\r\n    at _buildOperations (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:153:21)\r\n    at new module.exports (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/operations.js:40:26)\r\n    at /Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:252:26\r\n    at /Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/collection/index.js:85:24\r\n    at createTenantCollection (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/tenant.js:85:20)\r\n    at /Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/tenant.js:123:18\r\n    at bound.module.exports.connections.someMongodbServer.configForTenant (/Users/chipgata/Projects/ui-data-tracking/config/connections.js:75:20)\r\n    at bound.module.exports (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/dql/tenant.js:68:23)\r\n    at bound [as tenant] (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)\r\n    at bound.Collection._resolveCollection (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/collection/index.js:84:18)\r\n    at bound [as _resolveCollection] (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)\r\n    at bound.module.exports.find (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/finders/basic.js:248:10)\r\n    at bound [as find] (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)\r\n    at Deferred.exec (/Users/chipgata/Projects/ui-data-tracking/node_modules/sails/node_modules/waterline/lib/waterline/query/deferred.js:501:16) [TypeError: Cannot read property 'joins' of undefined]\r\n```\r\nPlease tell me I'm wrong place"},"comment":{"url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/issues/comments/105086103","html_url":"https://github.com/Glavin001/sails-multitenancy-example/issues/3#issuecomment-105086103","issue_url":"https://api.github.com/repos/Glavin001/sails-multitenancy-example/issues/3","id":105086103,"user":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T01:37:01Z","updated_at":"2015-05-25T01:37:01Z","body":"If memory serves me, I believe `joins` were not implemented for this Multitenancy, yet. It was on the TODO list however given that this is being effectively scrapped (see https://github.com/balderdashy/waterline/pull/787#issuecomment-87153003 ) I will not be implementing it. Unfortunately, I do not recommend using this code, as it was all tested, however it will not be maintained for the future."}}