{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/4415","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/4415/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/4415/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/4415/events","html_url":"https://github.com/sequelize/sequelize/issues/4415","id":104212579,"number":4415,"title":"Order clause doesn't work on column admissionAt","user":{"login":"mazzy89","id":5463218,"avatar_url":"https://avatars.githubusercontent.com/u/5463218?v=3","gravatar_id":"","url":"https://api.github.com/users/mazzy89","html_url":"https://github.com/mazzy89","followers_url":"https://api.github.com/users/mazzy89/followers","following_url":"https://api.github.com/users/mazzy89/following{/other_user}","gists_url":"https://api.github.com/users/mazzy89/gists{/gist_id}","starred_url":"https://api.github.com/users/mazzy89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazzy89/subscriptions","organizations_url":"https://api.github.com/users/mazzy89/orgs","repos_url":"https://api.github.com/users/mazzy89/repos","events_url":"https://api.github.com/users/mazzy89/events{/privacy}","received_events_url":"https://api.github.com/users/mazzy89/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-01T08:17:31Z","updated_at":"2015-09-01T08:17:31Z","closed_at":null,"body":"This is the schema of my model:\r\n\r\n```\r\nexport function initialize(sequelize: Sequelize.Sequelize, dataTypes: Sequelize.DataTypes): Investment.Model {\r\n  var investmentModel: Investment.Model = sequelize.define<Investment, Investment.Pojo>('investment', {\r\n    id: { type: dataTypes.UUID, defaultValue: dataTypes.UUIDV1, primaryKey: true },\r\n    investorId: { type: dataTypes.UUID, allowNull: false, field: 'investor_id' },\r\n    admissionAt: { type: dataTypes.CHAR(19), field: 'admission_at', defaultValue: '0000-00-00 00:00:00' },\r\n    approvedAt: { type: dataTypes.CHAR(19), field: 'approved_at', defaultValue: '0000-00-00 00:00:00' }\r\n  }, {\r\n    indexes: [{\r\n      fields: ['type']\r\n    }],\r\n    underscored: true,\r\n    tableName: 'investments'\r\n  });\r\n\r\n  return investmentModel;\r\n}\r\n```\r\nand this is the way I'm trying to order\r\n```\r\norder: [\r\n        [`${orderBy || 'created_at'}`, `${orderParam || 'DESC'}`]\r\n]\r\n```\r\n\r\nwhere `orderBy` is equal to `admission_At`\r\n\r\nbut unfortunately I get an error saying that the column doesn't exist in the database "}}