{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5531","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5531/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5531/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5531/events","html_url":"https://github.com/sequelize/sequelize/issues/5531","id":138624667,"number":5531,"title":"Model defined incorrectly","user":{"login":"kalvish21","id":2179704,"avatar_url":"https://avatars.githubusercontent.com/u/2179704?v=3","gravatar_id":"","url":"https://api.github.com/users/kalvish21","html_url":"https://github.com/kalvish21","followers_url":"https://api.github.com/users/kalvish21/followers","following_url":"https://api.github.com/users/kalvish21/following{/other_user}","gists_url":"https://api.github.com/users/kalvish21/gists{/gist_id}","starred_url":"https://api.github.com/users/kalvish21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalvish21/subscriptions","organizations_url":"https://api.github.com/users/kalvish21/orgs","repos_url":"https://api.github.com/users/kalvish21/repos","events_url":"https://api.github.com/users/kalvish21/events{/privacy}","received_events_url":"https://api.github.com/users/kalvish21/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-05T00:26:44Z","updated_at":"2016-03-07T07:21:34Z","closed_at":"2016-03-07T07:21:34Z","body":"I have the following model defined:\r\n\r\n```javascript\r\n\"use strict\";\r\n\r\nmodule.exports = function (sequelize, DataTypes) {\r\n    return sequelize.define(\r\n        'Years',\r\n        {\r\n            id: {\r\n                type: Sequelize.INTEGER,\r\n                primaryKey: true\r\n            },\r\n            label: {\r\n                type: Sequelize.STRING\r\n            },\r\n            last_modified: {\r\n                type: Sequelize.DATE\r\n            },\r\n            timestamp: {\r\n                type: Sequelize.DATE\r\n            }\r\n        }, {\r\n            tableName: \"web_years\",\r\n            freezeTableName: true,\r\n            timestamps: false\r\n        }\r\n    );\r\n};\r\n```\r\n\r\nI keep getting the below error:\r\n\r\nExecuting (default): SELECT 1+1 AS result\r\n/Users/myuser/hapitest/models/models.js is not a valid model\r\n\r\nWhat is the issue with my definition?"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/193134714","html_url":"https://github.com/sequelize/sequelize/issues/5531#issuecomment-193134714","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/5531","id":193134714,"user":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T07:21:34Z","updated_at":"2016-03-07T07:21:34Z","body":"It would be helpfull if you actually included the entire error.\r\nAt no point does Sequelize include a path to the model so are you sure this is a sequelize error at all?"}}