{"action":"created","issue":{"url":"https://api.github.com/repos/dresende/node-orm2/issues/808","repository_url":"https://api.github.com/repos/dresende/node-orm2","labels_url":"https://api.github.com/repos/dresende/node-orm2/issues/808/labels{/name}","comments_url":"https://api.github.com/repos/dresende/node-orm2/issues/808/comments","events_url":"https://api.github.com/repos/dresende/node-orm2/issues/808/events","html_url":"https://github.com/dresende/node-orm2/issues/808","id":259407304,"number":808,"title":"How to set multiple unique index with auto generated column from `.hasOne()` method.","user":{"login":"reumia","id":5867454,"avatar_url":"https://avatars2.githubusercontent.com/u/5867454?v=4","gravatar_id":"","url":"https://api.github.com/users/reumia","html_url":"https://github.com/reumia","followers_url":"https://api.github.com/users/reumia/followers","following_url":"https://api.github.com/users/reumia/following{/other_user}","gists_url":"https://api.github.com/users/reumia/gists{/gist_id}","starred_url":"https://api.github.com/users/reumia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reumia/subscriptions","organizations_url":"https://api.github.com/users/reumia/orgs","repos_url":"https://api.github.com/users/reumia/repos","events_url":"https://api.github.com/users/reumia/events{/privacy}","received_events_url":"https://api.github.com/users/reumia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-21T07:54:42Z","updated_at":"2017-10-17T01:46:32Z","closed_at":"2017-10-17T01:46:32Z","author_association":"NONE","body":"I made associations like this.\r\n```javascript\r\nconst LikesComic = db.models['likes_comic']\r\n\r\nLikesComic.hasOne('target', Comics)\r\nLikesComic.hasOne('user', Users)\r\n```\r\nthen, `target_id` and `user_id` columns are created automatically on `likes_comic` table.\r\n\r\nand I want to set multiple unique index like this.\r\n```javascript\r\n// if these columns - user_id & target_id - are not created automatically,\r\ndb.define('likes_comic', {\r\n  user_id: {type: 'integer', unique: 'user_id_target_id'},\r\n  target_id: {type: 'integer', unique: 'user_id_target_id'}\r\n})\r\n```\r\n\r\nmy currently defining is like above.\r\n```javascript\r\ndb.define('likes_comic', {\r\n  // nothings on here.\r\n})\r\n```\r\n\r\nis there any way to do this?"},"comment":{"url":"https://api.github.com/repos/dresende/node-orm2/issues/comments/337092914","html_url":"https://github.com/dresende/node-orm2/issues/808#issuecomment-337092914","issue_url":"https://api.github.com/repos/dresende/node-orm2/issues/808","id":337092914,"user":{"login":"reumia","id":5867454,"avatar_url":"https://avatars2.githubusercontent.com/u/5867454?v=4","gravatar_id":"","url":"https://api.github.com/users/reumia","html_url":"https://github.com/reumia","followers_url":"https://api.github.com/users/reumia/followers","following_url":"https://api.github.com/users/reumia/following{/other_user}","gists_url":"https://api.github.com/users/reumia/gists{/gist_id}","starred_url":"https://api.github.com/users/reumia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reumia/subscriptions","organizations_url":"https://api.github.com/users/reumia/orgs","repos_url":"https://api.github.com/users/reumia/repos","events_url":"https://api.github.com/users/reumia/events{/privacy}","received_events_url":"https://api.github.com/users/reumia/received_events","type":"User","site_admin":false},"created_at":"2017-10-17T01:46:32Z","updated_at":"2017-10-17T01:46:32Z","author_association":"NONE","body":"moved to #816 "}}
{"actor":{"display_login":"reumia"}}