Gorm, Go, and Has-Many
Using Gorm as an ORM to programmatically update many-to-many relationships in PostgreSQL
In this article I’ll explain briefly how to use Go to create a many-to-many relationship using
structs and also how to update the relationships correctly in your database. If you’re reading this article, I assume you’re familiar with Gorm, Go and have a dabble of experience in SQL. If not, Gorm is an ORM that allows you to take a more programmatic approach to interacting with SQL databases in lieu of writing SQL syntax queries within your code.