Merge branch 'master' of https://github.com/jinzhu/gorm
This commit is contained in:
		
						commit
						5bdf677206
					
				@ -570,7 +570,7 @@ db.Model(&user).Related(&card, "CreditCard")
 | 
				
			|||||||
//// SELECT * FROM credit_cards WHERE user_id = 123; // 123 is user's primary key
 | 
					//// SELECT * FROM credit_cards WHERE user_id = 123; // 123 is user's primary key
 | 
				
			||||||
// CreditCard is user's field name, it means get user's CreditCard relations and fill it into variable card
 | 
					// CreditCard is user's field name, it means get user's CreditCard relations and fill it into variable card
 | 
				
			||||||
// If the field name is same as the variable's type name, like above example, it could be omitted, like:
 | 
					// If the field name is same as the variable's type name, like above example, it could be omitted, like:
 | 
				
			||||||
db.Model(&user).Related(&creditCard, "CreditCard")
 | 
					db.Model(&user).Related(&card)
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Belongs To
 | 
					### Belongs To
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user