{"action":"opened","issue":{"url":"https://api.github.com/repos/gadelkareem/sails-dynamodb/issues/48","repository_url":"https://api.github.com/repos/gadelkareem/sails-dynamodb","labels_url":"https://api.github.com/repos/gadelkareem/sails-dynamodb/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/gadelkareem/sails-dynamodb/issues/48/comments","events_url":"https://api.github.com/repos/gadelkareem/sails-dynamodb/issues/48/events","html_url":"https://github.com/gadelkareem/sails-dynamodb/issues/48","id":307027582,"number":48,"title":"Error creating Object","user":{"login":"ggarcia92","id":32207826,"avatar_url":"https://avatars1.githubusercontent.com/u/32207826?v=4","gravatar_id":"","url":"https://api.github.com/users/ggarcia92","html_url":"https://github.com/ggarcia92","followers_url":"https://api.github.com/users/ggarcia92/followers","following_url":"https://api.github.com/users/ggarcia92/following{/other_user}","gists_url":"https://api.github.com/users/ggarcia92/gists{/gist_id}","starred_url":"https://api.github.com/users/ggarcia92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggarcia92/subscriptions","organizations_url":"https://api.github.com/users/ggarcia92/orgs","repos_url":"https://api.github.com/users/ggarcia92/repos","events_url":"https://api.github.com/users/ggarcia92/events{/privacy}","received_events_url":"https://api.github.com/users/ggarcia92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T20:32:46Z","updated_at":"2018-03-20T20:32:46Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI am using this module and when I tried to create an Object Sails send me back (\"Type mismatch for attribute to update\")\r\n\r\nThis is my code:\r\nModel:\r\n```javascript\r\nmodule.exports = {\r\n  attributes: {\r\n    id:{\r\n      type: 'string',\r\n      primaryKey: 'range'\r\n    },\r\n    picture:{\r\n      type: \"string\",\r\n      required: true\r\n    },\r\n    title:{\r\n      type: \"string\",\r\n      required: true\r\n    },\r\n    subcategories:{\r\n      collection: 'Subcategory',\r\n      via: 'category_ref'\r\n    },\r\n    user_ref:{\r\n      model: 'User'\r\n    }\r\n  }\r\n};\r\n```\r\nController:\r\n```javascript\r\ncreate: function (req, res, next) {\r\n           let  name = \"sometext\";\r\n            var obj = {\r\n                id: new String(uuidv4()),\r\n                picture: name,\r\n                title: req.param('title')\r\n            }\r\n            Category.create(obj, function (err, cat) {\r\n                if (err) {\r\n                    return next(err);\r\n                } else {\r\n                    return res.send(cat);\r\n                }\r\n            });\r\n        });\r\n    },\r\n```\r\nThanks in advance"}}
{"actor":{"display_login":"ggarcia92"}}