{"action":"created","issue":{"url":"https://api.github.com/repos/dmfay/massive-js/issues/476","repository_url":"https://api.github.com/repos/dmfay/massive-js","labels_url":"https://api.github.com/repos/dmfay/massive-js/issues/476/labels{/name}","comments_url":"https://api.github.com/repos/dmfay/massive-js/issues/476/comments","events_url":"https://api.github.com/repos/dmfay/massive-js/issues/476/events","html_url":"https://github.com/dmfay/massive-js/issues/476","id":260743759,"number":476,"title":"Missing join tables in db.tables","user":{"login":"brad-decker","id":4448075,"avatar_url":"https://avatars2.githubusercontent.com/u/4448075?v=4","gravatar_id":"","url":"https://api.github.com/users/brad-decker","html_url":"https://github.com/brad-decker","followers_url":"https://api.github.com/users/brad-decker/followers","following_url":"https://api.github.com/users/brad-decker/following{/other_user}","gists_url":"https://api.github.com/users/brad-decker/gists{/gist_id}","starred_url":"https://api.github.com/users/brad-decker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad-decker/subscriptions","organizations_url":"https://api.github.com/users/brad-decker/orgs","repos_url":"https://api.github.com/users/brad-decker/repos","events_url":"https://api.github.com/users/brad-decker/events{/privacy}","received_events_url":"https://api.github.com/users/brad-decker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-26T19:35:52Z","updated_at":"2017-09-26T19:37:35Z","closed_at":null,"author_association":"NONE","body":"So, to give a high level overview of our table structure. We have main tables that are capitalized. 'Users' and 'Lifestyles' among others. We also have join tables such as 'userLifestyles'. Some, but not all of, the join tables are missing when we run massive. So if we were to do:\r\n\r\n```js\r\n  db.userLifestyles\r\n```\r\n\r\nwe get undefined. We can query that table just fine without using the massive helper. Also if I loop through the values of db.table and console.log the path all of the tables that are camelCase (join tables) appear twice. Note in the clip below i'm toLowerCase()'ing to group like items. \r\n\r\n```\r\ndb.tables\r\n  .filter(t => t.schema === 'public')\r\n  .map(t => t.path.toLowerCase())\r\n  .sort()\r\n  .forEach(t => console.log(t));\r\n\r\nagentproperties\r\nagentproperties\r\nbusinessdeveloperproperties\r\nbusinessdeveloperproperties\r\n[...]\r\n```\r\n\r\nOverall there are three tables missing from massive. What would cause this to happen? Tagging the engineer on our team who originally discovered the issue which lead to this discover @arilfrankel\r\n"},"comment":{"url":"https://api.github.com/repos/dmfay/massive-js/issues/comments/332311577","html_url":"https://github.com/dmfay/massive-js/issues/476#issuecomment-332311577","issue_url":"https://api.github.com/repos/dmfay/massive-js/issues/476","id":332311577,"user":{"login":"dmfay","id":3075455,"avatar_url":"https://avatars3.githubusercontent.com/u/3075455?v=4","gravatar_id":"","url":"https://api.github.com/users/dmfay","html_url":"https://github.com/dmfay","followers_url":"https://api.github.com/users/dmfay/followers","following_url":"https://api.github.com/users/dmfay/following{/other_user}","gists_url":"https://api.github.com/users/dmfay/gists{/gist_id}","starred_url":"https://api.github.com/users/dmfay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmfay/subscriptions","organizations_url":"https://api.github.com/users/dmfay/orgs","repos_url":"https://api.github.com/users/dmfay/repos","events_url":"https://api.github.com/users/dmfay/events{/privacy}","received_events_url":"https://api.github.com/users/dmfay/received_events","type":"User","site_admin":false},"created_at":"2017-09-26T19:37:35Z","updated_at":"2017-09-26T19:37:35Z","author_association":"OWNER","body":"Your join tables probably don't have primary key constraints defined. Some table functionality depends on primary keys so Massive ignores tables without them."}}
{"actor":{"display_login":"dmfay"}}