{"action":"created","issue":{"url":"https://api.github.com/repos/neo4jrb/neo4apis/issues/7","labels_url":"https://api.github.com/repos/neo4jrb/neo4apis/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/neo4jrb/neo4apis/issues/7/comments","events_url":"https://api.github.com/repos/neo4jrb/neo4apis/issues/7/events","html_url":"https://github.com/neo4jrb/neo4apis/issues/7","id":103276807,"number":7,"title":"'Could not find a primary key for PlayListTrack' when importing using MySql","user":{"login":"casertap","id":284394,"avatar_url":"https://avatars.githubusercontent.com/u/284394?v=3","gravatar_id":"","url":"https://api.github.com/users/casertap","html_url":"https://github.com/casertap","followers_url":"https://api.github.com/users/casertap/followers","following_url":"https://api.github.com/users/casertap/following{/other_user}","gists_url":"https://api.github.com/users/casertap/gists{/gist_id}","starred_url":"https://api.github.com/users/casertap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casertap/subscriptions","organizations_url":"https://api.github.com/users/casertap/orgs","repos_url":"https://api.github.com/users/casertap/repos","events_url":"https://api.github.com/users/casertap/events{/privacy}","received_events_url":"https://api.github.com/users/casertap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-26T14:00:20Z","updated_at":"2015-08-28T15:05:56Z","closed_at":null,"body":"Following this blog post: http://neo4j.com/blog/loading-sql-neo4j-like-magic/\r\nwith the difference of using the Chinook_Mysql.sql database\r\nand importing into a mysql database using utf8 encoding.\r\n\r\nI get a stack saying: Could not find a primary key for PlayListTrack\r\n\r\n<img width=\"1440\" alt=\"screen shot 2015-08-26 at 10 29 14\" src=\"https://cloud.githubusercontent.com/assets/284394/9495373/891bb404-4c0b-11e5-9f18-59fa5087b73a.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/neo4jrb/neo4apis/issues/comments/135799232","html_url":"https://github.com/neo4jrb/neo4apis/issues/7#issuecomment-135799232","issue_url":"https://api.github.com/repos/neo4jrb/neo4apis/issues/7","id":135799232,"user":{"login":"cheerfulstoic","id":301415,"avatar_url":"https://avatars.githubusercontent.com/u/301415?v=3","gravatar_id":"","url":"https://api.github.com/users/cheerfulstoic","html_url":"https://github.com/cheerfulstoic","followers_url":"https://api.github.com/users/cheerfulstoic/followers","following_url":"https://api.github.com/users/cheerfulstoic/following{/other_user}","gists_url":"https://api.github.com/users/cheerfulstoic/gists{/gist_id}","starred_url":"https://api.github.com/users/cheerfulstoic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheerfulstoic/subscriptions","organizations_url":"https://api.github.com/users/cheerfulstoic/orgs","repos_url":"https://api.github.com/users/cheerfulstoic/repos","events_url":"https://api.github.com/users/cheerfulstoic/events{/privacy}","received_events_url":"https://api.github.com/users/cheerfulstoic/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T15:05:56Z","updated_at":"2015-08-28T15:05:56Z","body":"Ok, I've just updated `neo4apis-activerecord` to 0.9.0 which should now support this (tables with just two integers will be assumed to be a many-to-many table and will be created as a relationship).  I also updated `neo4apis` by a patch version, so be on the lookout for that.\r\n\r\nIf you're using something other than the default username/password/port then you can use the `--neo4j-url` option like so:\r\n\r\n```\r\nneo4apis activerecord all_tables --neo4j-url \"http://username:password@localhost:7000\" --identify-model --import-all-associations --debug\r\n```\r\n\r\nLet me know how that works.\r\n\r\nI'm thinking I should build a stripped down version of the Chinook database and have tests which automatically load it into different databases and then test the end result in Neo4j after running it through `neo4apis-activerecord`.\r\n\r\nOne reason is that I'd like to improve the solution that I made.  Rather than looking for just a table with two integers, it should find if there are two columns which are foreign keys to another table because there might be other associated data.  Tests should help build this sort of complexity out in a sane manner."}}