Skip to content

Commit

Permalink
Revert addition of gorm config to update nested fields in the db (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts authored Apr 18, 2023
1 parent 49bfdf8 commit 8222a91
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions management-service/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8222a91

Please sign in to comment.