Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for Many2Many (0.32 sec)

  1. generics.go

    				} else {
    					db.AddError(fmt.Errorf("relation %s not found", association))
    					return nil
    				}
    			}
    
    			if q.limitPerRecord > 0 {
    				if relation.JoinTable != nil {
    					tx.AddError(fmt.Errorf("many2many relation %s don't support LimitPerRecord", association))
    					return tx
    				}
    
    				refColumns := []clause.Column{}
    				for _, rel := range relation.References {
    					if rel.OwnPrimaryKey {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  2. migrator/migrator.go

    		return &uni, stmt.Table
    	}
    
    	getTable := func(rel *schema.Relationship) string {
    		switch rel.Type {
    		case schema.HasOne, schema.HasMany:
    			return rel.FieldSchema.Table
    		case schema.Many2Many:
    			return rel.JoinTable.Table
    		}
    		return stmt.Table
    	}
    
    	for _, rel := range stmt.Schema.Relationships.Relations {
    		if constraint := rel.ParseConstraint(); constraint != nil && constraint.Name == name {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Fri Jun 06 02:35:01 UTC 2025
    - 29.5K bytes
    - Viewed (0)
  3. tests/migrate_test.go

    		{"accounts", "fk_users_account"},
    		{"users", "fk_users_team"},
    		{"users", "fk_users_company"},
    	} {
    		if !DB.Migrator().HasConstraint(indexes[0], indexes[1]) {
    			t.Fatalf("Failed to find index for many2many for %v %v", indexes[0], indexes[1])
    		}
    	}
    }
    
    func TestAutoMigrateInt8PGAndGaussDB(t *testing.T) {
    	if DB.Dialector.Name() != "postgres" && DB.Dialector.Name() != "gaussdb" {
    		return
    	}
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 65.2K bytes
    - Viewed (0)
Back to top