This commit is contained in:
Adam Glazer 2024-11-22 09:40:24 +08:00 committed by GitHub
commit 140732ff90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -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,