mirror of https://github.com/go-gorm/gorm.git
Merge d95ad7b49d
into 6bfccf8afa
This commit is contained in:
commit
140732ff90
|
@ -41,6 +41,16 @@ func (db *DB) Association(column string) *Association {
|
||||||
return 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 {
|
func (association *Association) Unscoped() *Association {
|
||||||
return &Association{
|
return &Association{
|
||||||
DB: association.DB,
|
DB: association.DB,
|
||||||
|
|
Loading…
Reference in New Issue