Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for association (0.05 sec)

  1. association.go

    		association.Error = err
    	}
    
    	return association
    }
    
    func (association *Association) Unscoped() *Association {
    	return &Association{
    		DB:           association.DB,
    		Relationship: association.Relationship,
    		Error:        association.Error,
    		Unscope:      true,
    	}
    }
    
    func (association *Association) Find(out interface{}, conds ...interface{}) error {
    	if association.Error == nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  2. tests/multi_primary_keys_test.go

    	var tags3 []Tag
    	DB.Model(&blog).Association("Tags").Find(&tags3)
    	if !compareTags(tags3, []string{"tag6"}) {
    		t.Fatalf("Should find 1 tags after Delete")
    	}
    
    	if DB.Model(&blog).Association("Tags").Count() != 1 {
    		t.Fatalf("Blog should has three tags after Delete")
    	}
    
    	DB.Model(&blog).Association("Tags").Delete(tag3)
    	var tags4 []Tag
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  3. tests/associations_has_many_test.go

    	}
    
    	// test delete
    	if err := tx.Model(&item).Association("Contents").Unscoped().Delete(&contents[0]); err != nil {
    		t.Errorf("failed to delete Contents, got error: %v", err)
    	}
    	if count := tx.Model(&item).Association("Contents").Count(); count != 2 {
    		t.Errorf("expected %d contents, got %d", 2, count)
    	}
    
    	// test clear
    	if err := tx.Model(&item).Association("Contents").Unscoped().Clear(); err != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  4. tests/associations_many2many_test.go

    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Languages").Find(&user2.Languages)
    
    	CheckUser(t, user2, user)
    
    	// Count
    	AssertAssociationCount(t, user, "Languages", 2, "")
    
    	// Append
    	language := Language{Code: "language-many2many-append", Name: "language-many2many-append"}
    	DB.Create(&language)
    
    	if err := DB.Model(&user2).Association("Languages").Append(&language); err != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sat Jun 10 13:05:19 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  5. api/maven-api-settings/src/main/mdo/settings.mdo

                <type>Repository</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
            <field>
              <name>pluginRepositories</name>
              <version>1.3.0+</version>
              <description>
                The lists of the remote repositories for discovering plugins.
              </description>
              <association>
                <type>Repository</type>
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Sun May 18 09:15:56 UTC 2025
    - 33.8K bytes
    - Viewed (0)
  6. compat/maven-compat/src/main/mdo/profiles.mdo

              <association>
                <type>Activation</type>
              </association>
            </field>
            <field>
              <name>properties</name>
              <description>Extended configuration specific to this profile goes
                here.</description>
              <type>Properties</type>
              <association xml.mapStyle="inline">
                <type>String</type>
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Wed Jan 22 11:03:29 UTC 2025
    - 13.8K bytes
    - Viewed (0)
  7. generics.go

    							db.AddError(fmt.Errorf("relation %s not found", association))
    							return nil
    						}
    					}
    				} 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
    				}
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  8. tests/associations_test.go

    	var emptyUser User
    	var err error
    	// belongs to
    	err = DB.Model(&emptyUser).Association("Company").Delete(&user1.Company)
    	AssertEqual(t, err, gorm.ErrPrimaryKeyRequired)
    	// has many
    	err = DB.Model(&emptyUser).Association("Pets").Delete(&user1.Pets)
    	AssertEqual(t, err, gorm.ErrPrimaryKeyRequired)
    	// has one
    	err = DB.Model(&emptyUser).Association("Account").Delete(&user1.Account)
    	AssertEqual(t, err, gorm.ErrPrimaryKeyRequired)
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Feb 08 08:29:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  9. api/maven-api-metadata/src/main/mdo/metadata.mdo

            </field>
            <field>
              <name>versioning</name>
              <version>1.0.0+</version>
              <association>
                <type>Versioning</type>
              </association>
              <description>Versioning information when this directory represents "groupId/artifactId" or "groupId/artifactId/version".</description>
            </field>
            <field>
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Wed May 15 17:32:27 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  10. api/maven-api-plugin/src/main/mdo/plugin.mdo

              <description></description>
              <association>
                <type>Parameter</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
            <field xdoc.separator="blank">
              <name>resolutions</name>
              <version>2.0.0+</version>
              <description></description>
              <association>
                <type>Resolution</type>
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Tue Feb 25 08:28:41 UTC 2025
    - 24.8K bytes
    - Viewed (0)
Back to top