SequelizeJS: Recursive include same model
问题 I want to fetch data from a Postgres database recursively including all associated models using SequelizeJS. GeoLocations table id | isoCode | name | parentId | type | updatedAt | deletedAt parentId holds the id of the parent GeoLocation. Model Associations GeoLocation.belongsTo(GeoLocation, { foreignKey: 'parentId', as: 'GeoLocation' }); Data explanation and example GeoLocation types and their relations: city -> subdivision -> country -> continent id: 552, name: Brooklyn, type: city,