Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 58 for Association (0.21 sec)

  1. tests/joins_table_test.go

    	}
    
    	if DB.Unscoped().Model(&person).Association("Addresses").Count() != 2 {
    		t.Fatalf("Should found soft deleted addresses with unscoped")
    	}
    
    	DB.Model(&person).Association("Addresses").Clear()
    
    	if DB.Model(&person).Association("Addresses").Count() != 0 {
    		t.Fatalf("Should deleted all addresses")
    	}
    
    	if DB.Unscoped().Model(&person).Association("Addresses").Count() != 2 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Sep 10 13:46:18 GMT 2020
    - 3.5K bytes
    - Viewed (0)
  2. callbacks/associations.go

    		tx = tx.Omit(clause.Associations)
    	}
    
    	if len(omits) > 0 {
    		tx = tx.Omit(omits...)
    	}
    
    	return db.AddError(tx.Create(values).Error)
    }
    
    // check association values has been saved
    // if values kind is Struct, check it has been saved
    // if values kind is Slice/Array, check all items have been saved
    var visitMapStoreKey = "gorm:saved_association_map"
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 03:06:13 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  3. tests/named_polymorphic_test.go

    		t.Errorf("Should find has one polymorphic association")
    	}
    
    	hamsterToy = Toy{}
    	DB.Model(&hamster).Association("OtherToy").Find(&hamsterToy)
    	if hamsterToy.Name != hamster.OtherToy.Name {
    		t.Errorf("Should find has one polymorphic association")
    	}
    
    	// Append
    	DB.Model(&hamster).Association("PreferredToy").Append(&Toy{
    		Name: "bike 2",
    	})
    
    	DB.Model(&hamster).Association("OtherToy").Append(&Toy{
    		Name: "treadmill 2",
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jul 08 09:59:40 GMT 2020
    - 4.2K bytes
    - Viewed (0)
  4. 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
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 12.8K bytes
    - Viewed (0)
  5. api/maven-api-model/src/main/mdo/maven.mdo

              </description>
              <association>
                <type>License</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
            <field xdoc.separator="blank">
              <name>developers</name>
              <version>3.0.0+</version>
              <description>Describes the committers of a project.</description>
              <association>
                <type>Developer</type>
    XML
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Tue Apr 23 13:29:46 GMT 2024
    - 115.1K bytes
    - Viewed (0)
  6. tests/update_belongs_to_test.go

    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	user.Company = Company{Name: "company-belongs-to-association"}
    	user.Manager = &User{Name: "manager-belongs-to-association"}
    	if err := DB.Save(&user).Error; err != nil {
    		t.Fatalf("errors happened when update: %v", err)
    	}
    
    	var user2 User
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jul 14 06:55:54 GMT 2022
    - 1.6K bytes
    - Viewed (0)
  7. maven-core/src/main/mdo/extension.mdo

          <fields>
            <field>
              <name>exportedPackages</name>
              <version>1.0.0</version>
              <association>
                <type>String</type>
                <multiplicity>*</multiplicity>
              </association>
    XML
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Feb 07 21:28:01 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  8. maven-compat/src/main/mdo/paramdoc.mdo

              <name>expressions</name>
              <description>The list of plugin parameter expressions described by this
                document.</description>
              <association>
                <type>Expression</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
          </fields>
          <codeSegments>
            <codeSegment>
              <version>1.0.0</version>
    XML
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri Aug 21 15:04:07 GMT 2009
    - 5.4K bytes
    - Viewed (0)
  9. tests/delete_test.go

    		if count := DB.Unscoped().Model(&user).Association(key).Count(); count != value {
    			t.Errorf("user's %v expects: %v, got %v", key, value, count)
    		}
    	}
    
    	for key, value := range map[string]int64{"Account": 0, "Pets": 0, "Toys": 0, "Company": 1, "Manager": 1, "Team": 0, "Languages": 0, "Friends": 0} {
    		if count := DB.Model(&user).Association(key).Count(); count != value {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  10. maven-core/src/test/projects/lifecycle-executor/project-with-multiple-executions/src/main/mdo/remote-resources.mdo

              <description>
                Remote resources that are contained in a remote resources bundle.
              </description>
              <association>
                <type>String</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
            <field>
              <name>sourceEncoding</name>
              <version>1.1.0</version>
              <description>
    XML
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Feb 07 21:28:01 GMT 2024
    - 2K bytes
    - Viewed (0)
Back to top