Sequelize Associations

Daily Standup

It’s been some time since I’ve written here but I’ve been working away on GFT. The latest thing I’m wrapping my head around is creating associations using Sequelize.

Associations Research

Demo Repo

I created a sandbox repo to play around with all of this research, basically following the walk-through tutorial listed above. It was really helpful to go through this—in addition to learning how to set up the associations, I also came to understand how and why a lot of other examples I’ve seen (including the Sequelize docs) use export modules and the database. It’s a lot cleaner with less repetitive code/imports, so I plan to refactor my app as well.

But before that, I made this demo repo and tried out the different kinds of associations. And I still go stuck in the same place!!

Other Stuff

I came across an interesting course called Data Structures and Algorithms in JavaScript which I think is free for the month of December. It’s part of the ‘Advent of courses’ Egghead is offering this month.

Up Next

Progress on GFT is stuck until I can figure out these associations, so will keep working on that.

[UPDATE SEVERAL HOURS LATER]: I did it!! I got it to work in my demo app, very exciting. I’m pretty sure the same implementation failed in the actual app, but it’s worth another shot.