mirror of https://github.com/go-gorm/gorm.git
Merge d95ad7b49d
into 49bbaa637f
This commit is contained in:
commit
cd869a0b5e
|
@ -41,6 +41,16 @@ func (db *DB) Association(column string) *Association {
|
|||
return association
|
||||
}
|
||||
|
||||
func (association *Association) BuildCondition() *DB {
|
||||
if association.Error != nil {
|
||||
tx := association.DB
|
||||
tx.Error = association.Error
|
||||
return tx
|
||||
}
|
||||
|
||||
return association.buildCondition()
|
||||
}
|
||||
|
||||
func (association *Association) Unscoped() *Association {
|
||||
return &Association{
|
||||
DB: association.DB,
|
||||
|
|
Loading…
Reference in New Issue