{"action":"closed","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/2392","repository_url":"https://api.github.com/repos/strongloop/loopback","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/2392/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/2392/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/2392/events","html_url":"https://github.com/strongloop/loopback/issues/2392","id":157667224,"number":2392,"title":"When using slc loopback:relation, I get [object Promise] error","user":{"login":"subchal","id":16006027,"avatar_url":"https://avatars.githubusercontent.com/u/16006027?v=3","gravatar_id":"","url":"https://api.github.com/users/subchal","html_url":"https://github.com/subchal","followers_url":"https://api.github.com/users/subchal/followers","following_url":"https://api.github.com/users/subchal/following{/other_user}","gists_url":"https://api.github.com/users/subchal/gists{/gist_id}","starred_url":"https://api.github.com/users/subchal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subchal/subscriptions","organizations_url":"https://api.github.com/users/subchal/orgs","repos_url":"https://api.github.com/users/subchal/repos","events_url":"https://api.github.com/users/subchal/events{/privacy}","received_events_url":"https://api.github.com/users/subchal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/duplicate","name":"duplicate","color":"eeeeee"}],"state":"closed","locked":false,"assignee":{"login":"gunjpan","id":14811089,"avatar_url":"https://avatars.githubusercontent.com/u/14811089?v=3","gravatar_id":"","url":"https://api.github.com/users/gunjpan","html_url":"https://github.com/gunjpan","followers_url":"https://api.github.com/users/gunjpan/followers","following_url":"https://api.github.com/users/gunjpan/following{/other_user}","gists_url":"https://api.github.com/users/gunjpan/gists{/gist_id}","starred_url":"https://api.github.com/users/gunjpan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunjpan/subscriptions","organizations_url":"https://api.github.com/users/gunjpan/orgs","repos_url":"https://api.github.com/users/gunjpan/repos","events_url":"https://api.github.com/users/gunjpan/events{/privacy}","received_events_url":"https://api.github.com/users/gunjpan/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2016-05-31T13:08:13Z","updated_at":"2016-06-01T15:18:56Z","closed_at":"2016-06-01T15:18:56Z","body":"Hi good morning everyone,\r\n\r\nI am on Windows 7. and npm version is 3.6.0.  I was trying to play with slc loopback:relation concept. Whenever, I try to establish a has-many relationship between two models, I run into the [object Promise] showing up in red color at the point where I was prompted to enter the name of the relationship. I spent several hours trying to figure out what may be causing the issue.\r\n\r\nBelow is the example that I was trying to do - Please see the last line, where it says, [object Promise] - I am not able to get past this issue no matter whatever I enter.\r\n\r\nAny clues will be greatly appreciated\r\n```console\r\nC:\\sairam\\OMSaiRamC\\FullStack\\Session - 5\\Week 4\\loopback-server>slc loopback:model\r\n? Enter the model name: Test1\r\n? Select the data-source to attach undefined to: MongoDB (mongodb)\r\n? Select model's base class PersistedModel\r\n? Expose Test2 via the REST API? Yes\r\n? Custom plural form (used to build REST URL):\r\n? Common model or server only? common\r\nLet's add some Test1 properties now.\r\n\r\nEnter an empty property name when done.\r\n? Property name: Name\r\n   invoke   loopback:property\r\n? Property type: string\r\n? Required? Yes\r\n? Default value[leave blank for none]:\r\n\r\nLet's add another Test1 property.\r\nEnter an empty property name when done.\r\n? Property name: Description\r\n   invoke   loopback:property\r\n? Property type: string\r\n? Required? Yes\r\n? Default value[leave blank for none]:\r\n\r\nLet's add another Test1 property.\r\nEnter an empty property name when done.\r\n? Property name:\r\n\r\n\r\nC:\\sairam\\OMSaiRamC\\FullStack\\Session - 5\\Week 4\\loopback-server>slc loopback:model\r\n? Enter the model name: Test2\r\n? Select the data-source to attach undefined to: MongoDB (mongodb)\r\n? Select model's base class PersistedModel\r\n? Expose Test2 via the REST API? Yes\r\n? Custom plural form (used to build REST URL):\r\n? Common model or server only? common\r\nLet's add some Test2 properties now.\r\n\r\nEnter an empty property name when done.\r\n? Property name: Price\r\n   invoke   loopback:property\r\n? Property type: string\r\n? Required? Yes\r\n? Default value[leave blank for none]:\r\n\r\nLet's add another Test2 property.\r\nEnter an empty property name when done.\r\n? Property name: Label\r\n   invoke   loopback:property\r\n? Property type: string\r\n? Required? Yes\r\n? Default value[leave blank for none]:\r\n\r\nLet's add another Test2 property.\r\nEnter an empty property name when done.\r\n? Property name:\r\n\r\n\r\nC:\\sairam\\OMSaiRamC\\FullStack\\Session - 5\\Week 4\\loopback-server>slc loopback:relation\r\n? Select the model to create the relationship from: Test1\r\n? Relation type: has many\r\n? Choose a model to create a relationship with: Test2\r\n? Enter the property name for the relation: (test2s)\r\n>> [object Promise]\r\n```"}}
{"actor":{"display_login":"gunjpan"}}