---
title: "Discussion on \"Sequelize Associations\" | Hashnode"
description: "Discussion on \"Sequelize Associations\". There are is four type of associations.\n\n\nA.hasOne(B);  // A is source and B is target\nA.belongsTo(B); \nA.hasMany(B); \nA.belongsToMany(B, { through: 'C' });\n\nThe A.hasOne(B) mean, foreign key defined in the target model (B).\nThe A.belongsTo(B) foreig..."
url: "https://hashnode.com/posts/sequelize-associations/60795bc990c7837c7501088e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Sequelize Associations](https://thilina.hashnode.dev/sequelize-associations?utm_source=hashnode&utm_medium=feed)

There are is four type of associations. A.hasOne(B); // A is source and B is target A.belongsTo(B); A.hasMany(B); A.belongsToMany(B, { through: 'C' }); The A.hasOne(B) mean, foreign key defined in the target model (B). The A.belongsTo(B) foreig...

Apr 16, 2021 · 1 min read · thilina.hashnode.dev  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#sequelize](https://hashnode.com/tag/sequelize)

## Written by

[thilina dilshan](https://hashnode.com/@Thilina)

@Thilina

  
[View profile](https://hashnode.com/@Thilina)

Software developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
