From 8222a91d65678493753baabd2444ba7cf7861bf7 Mon Sep 17 00:00:00 2001 From: Ewe Zi Yi <36802364+deadlycoconuts@users.noreply.github.com> Date: Tue, 18 Apr 2023 11:42:40 +0800 Subject: [PATCH] Revert addition of gorm config to update nested fields in the db (#71) --- management-service/database/database.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/management-service/database/database.go b/management-service/database/database.go index 8cc86260..d8bd4a10 100644 --- a/management-service/database/database.go +++ b/management-service/database/database.go @@ -29,9 +29,7 @@ func ConnectionString(cfg *config.DatabaseConfig) string { func Open(cfg *config.DatabaseConfig) (*gorm.DB, error) { db, err := gorm.Open(pg.Open(ConnectionString(cfg)), &gorm.Config{ - // This is needed to ensure that any saves to nested fields also update their respective tables - FullSaveAssociations: true, - Logger: logger.Default.LogMode(logger.Silent), + Logger: logger.Default.LogMode(logger.Silent), }) if err != nil { return nil, err