Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestPropagateUnscoped (0.09 sec)

  1. tests/hooks_test.go

    	gorm.Model
    	Product6ID uint
    }
    
    func (p *Product6) BeforeDelete(tx *gorm.DB) error {
    	if err := tx.Delete(&p.Item).Error; err != nil {
    		return err
    	}
    	return nil
    }
    
    func TestPropagateUnscoped(t *testing.T) {
    	_DB, err := OpenTestConnection(&gorm.Config{
    		PropagateUnscoped: true,
    	})
    	if err != nil {
    		log.Printf("failed to connect database, got error %v", err)
    		os.Exit(1)
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
Back to top