Fix Set/Get settings when saving associations, close #3908
This commit is contained in:
		
							parent
							
								
									53b3ebdd1d
								
							
						
					
					
						commit
						6d260a86bd
					
				| @ -363,6 +363,11 @@ func saveAssociations(db *gorm.DB, rel *schema.Relationship, values interface{}, | ||||
| 		DisableNestedTransaction: true, | ||||
| 	}) | ||||
| 
 | ||||
| 	db.Statement.Settings.Range(func(k, v interface{}) bool { | ||||
| 		tx.Statement.Settings.Store(k, v) | ||||
| 		return true | ||||
| 	}) | ||||
| 
 | ||||
| 	if len(selects) > 0 { | ||||
| 		tx = tx.Select(selects) | ||||
| 	} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jinzhu
						Jinzhu