{"action":"created","issue":{"url":"https://api.github.com/repos/strapi/strapi/issues/862","repository_url":"https://api.github.com/repos/strapi/strapi","labels_url":"https://api.github.com/repos/strapi/strapi/issues/862/labels{/name}","comments_url":"https://api.github.com/repos/strapi/strapi/issues/862/comments","events_url":"https://api.github.com/repos/strapi/strapi/issues/862/events","html_url":"https://github.com/strapi/strapi/issues/862","id":309246526,"number":862,"title":"Adding support for MySQL relationships? ","user":{"login":"piere129","id":17174150,"avatar_url":"https://avatars2.githubusercontent.com/u/17174150?v=4","gravatar_id":"","url":"https://api.github.com/users/piere129","html_url":"https://github.com/piere129","followers_url":"https://api.github.com/users/piere129/followers","following_url":"https://api.github.com/users/piere129/following{/other_user}","gists_url":"https://api.github.com/users/piere129/gists{/gist_id}","starred_url":"https://api.github.com/users/piere129/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piere129/subscriptions","organizations_url":"https://api.github.com/users/piere129/orgs","repos_url":"https://api.github.com/users/piere129/repos","events_url":"https://api.github.com/users/piere129/events{/privacy}","received_events_url":"https://api.github.com/users/piere129/received_events","type":"User","site_admin":false},"labels":[{"id":749109179,"url":"https://api.github.com/repos/strapi/strapi/labels/priority:%20low","name":"priority: low","color":"028d01","default":false},{"id":269636166,"url":"https://api.github.com/repos/strapi/strapi/labels/type:%20feature%20request%20%F0%9F%99%8F","name":"type: feature request 🙏","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":{"login":"Aurelsicoko","id":4144726,"avatar_url":"https://avatars0.githubusercontent.com/u/4144726?v=4","gravatar_id":"","url":"https://api.github.com/users/Aurelsicoko","html_url":"https://github.com/Aurelsicoko","followers_url":"https://api.github.com/users/Aurelsicoko/followers","following_url":"https://api.github.com/users/Aurelsicoko/following{/other_user}","gists_url":"https://api.github.com/users/Aurelsicoko/gists{/gist_id}","starred_url":"https://api.github.com/users/Aurelsicoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aurelsicoko/subscriptions","organizations_url":"https://api.github.com/users/Aurelsicoko/orgs","repos_url":"https://api.github.com/users/Aurelsicoko/repos","events_url":"https://api.github.com/users/Aurelsicoko/events{/privacy}","received_events_url":"https://api.github.com/users/Aurelsicoko/received_events","type":"User","site_admin":false},"assignees":[{"login":"Aurelsicoko","id":4144726,"avatar_url":"https://avatars0.githubusercontent.com/u/4144726?v=4","gravatar_id":"","url":"https://api.github.com/users/Aurelsicoko","html_url":"https://github.com/Aurelsicoko","followers_url":"https://api.github.com/users/Aurelsicoko/followers","following_url":"https://api.github.com/users/Aurelsicoko/following{/other_user}","gists_url":"https://api.github.com/users/Aurelsicoko/gists{/gist_id}","starred_url":"https://api.github.com/users/Aurelsicoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aurelsicoko/subscriptions","organizations_url":"https://api.github.com/users/Aurelsicoko/orgs","repos_url":"https://api.github.com/users/Aurelsicoko/repos","events_url":"https://api.github.com/users/Aurelsicoko/events{/privacy}","received_events_url":"https://api.github.com/users/Aurelsicoko/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/strapi/strapi/milestones/13","html_url":"https://github.com/strapi/strapi/milestone/13","labels_url":"https://api.github.com/repos/strapi/strapi/milestones/13/labels","id":3278186,"number":13,"title":" 3.0.0-alpha.12.2","description":"","creator":{"login":"lauriejim","id":5716596,"avatar_url":"https://avatars3.githubusercontent.com/u/5716596?v=4","gravatar_id":"","url":"https://api.github.com/users/lauriejim","html_url":"https://github.com/lauriejim","followers_url":"https://api.github.com/users/lauriejim/followers","following_url":"https://api.github.com/users/lauriejim/following{/other_user}","gists_url":"https://api.github.com/users/lauriejim/gists{/gist_id}","starred_url":"https://api.github.com/users/lauriejim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauriejim/subscriptions","organizations_url":"https://api.github.com/users/lauriejim/orgs","repos_url":"https://api.github.com/users/lauriejim/repos","events_url":"https://api.github.com/users/lauriejim/events{/privacy}","received_events_url":"https://api.github.com/users/lauriejim/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":3,"state":"open","created_at":"2018-04-18T14:27:19Z","updated_at":"2018-04-23T13:32:21Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-03-28T07:12:35Z","updated_at":"2018-04-23T13:32:21Z","closed_at":"2018-04-23T13:32:21Z","author_association":"NONE","body":"**Node.js version:**\r\n9.8\r\n**npm version:**\r\n5.5.1\r\n**Strapi version:**\r\n3.0.0-alpha.11\r\n**Operating system:**\r\nWindows 10\r\n\r\n**Do you want to request a feature or report a bug?**\r\n\r\nrequest a feature\r\n\r\n**What is the current behavior?**\r\n\r\nRelationships added to content-types are always two-way and requires the specification of 2 variables, one for each of the content-types. I assume these are supposed to be the arrays or variables in which the content-type is stored. However this gives a lot of issues when working with a MySQL database. I currently can only use MySQL with seperate tables, and default data types like strings. This is my table creation script for product content-type, and it currently works (just not with relationships):\r\n\r\n`CREATE TABLE 'items' (\r\n  'id' mediumint(9) NOT NULL AUTO_INCREMENT,\r\n  'created_at' varchar(255) NOT NULL,\r\n  'name' varchar(255) NOT NULL,\r\n  'updated_at' varchar(255) NOT NULL,\r\n  PRIMARY KEY (`id`)\r\n) \r\n`\r\n\r\n**What is the expected behavior?**\r\n\r\nAdding support for MySQL relationships, or documentation on how to map relationships in a mysql database. Perhaps rendering a table creation script for the user to implement in his server after creating a new content-type?"},"comment":{"url":"https://api.github.com/repos/strapi/strapi/issues/comments/383576206","html_url":"https://github.com/strapi/strapi/issues/862#issuecomment-383576206","issue_url":"https://api.github.com/repos/strapi/strapi/issues/862","id":383576206,"user":{"login":"Aurelsicoko","id":4144726,"avatar_url":"https://avatars0.githubusercontent.com/u/4144726?v=4","gravatar_id":"","url":"https://api.github.com/users/Aurelsicoko","html_url":"https://github.com/Aurelsicoko","followers_url":"https://api.github.com/users/Aurelsicoko/followers","following_url":"https://api.github.com/users/Aurelsicoko/following{/other_user}","gists_url":"https://api.github.com/users/Aurelsicoko/gists{/gist_id}","starred_url":"https://api.github.com/users/Aurelsicoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aurelsicoko/subscriptions","organizations_url":"https://api.github.com/users/Aurelsicoko/orgs","repos_url":"https://api.github.com/users/Aurelsicoko/repos","events_url":"https://api.github.com/users/Aurelsicoko/events{/privacy}","received_events_url":"https://api.github.com/users/Aurelsicoko/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T13:32:21Z","updated_at":"2018-04-23T13:32:21Z","author_association":"CONTRIBUTOR","body":"@piere129 I'm closing this issue. The solution proposed by @ArkhipovK is working perfectly (one-way relationship)."}}
{"actor":{"display_login":"Aurelsicoko"}}