Sequelize one to many assocation in multiple files
I am working on one to many assocations with sequelize. Most tutorials and documentation shows examples when both models are defined in the same file. I currently have two files, first city.js: const Promise = require('bluebird'); var Country = require('./country'); var City = sequelize.define("City", { id: { type: DataTypes.INTEGER, field: 'id', primaryKey: true, autoIncrement: true },... }, { freezeTableName: true, timestamps: false }); City.belongsTo(Country, {foreignKey : 'countryId', as: 'Country'}); Promise.promisifyAll(City); module.exports = City; And a second file country.js: const