id: null when creating a new item in sequelize
问题 When I try to create a new Conversation item Sequelize will return an object with id: null eventhough there is an valid id in the database. How can I get Sequelize to return the last inserted id to the newly created item? Conversation.create({ type: 'private', createdBy: 1, }).then(conversation => { reply(conversation); }); Will return { "type": "conversations", "id": null, "createdBy": 1, "created_at": "2016-03-18T01:47:48.000Z" } My code: const Conversation = model.define('Conversation', {