Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for association (0.18 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 {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Sep 10 13:46:18 UTC 2020
    - 3.5K bytes
    - Viewed (0)
  2. tests/associations_belongs_to_test.go

    	// Clear
    	DB.Model(&users).Association("Company").Clear()
    	AssertAssociationCount(t, users, "Company", 0, "After Clear")
    
    	DB.Model(&users).Association("Manager").Clear()
    	AssertAssociationCount(t, users, "Manager", 0, "After Clear")
    
    	// shared company
    	company := Company{Name: "shared"}
    	if err := DB.Model(&users[0]).Association("Company").Append(&company); err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  3. api/maven-api-plugin/src/main/mdo/lifecycle.mdo

          <fields>
            <field>
              <name>lifecycles</name>
              <version>1.0.0+</version>
              <association xml.itemsStyle="flat">
                <type>Lifecycle</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
          </fields>
        </class>
        <class>
          <name>Lifecycle</name>
          <version>1.0.0+</version>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Thu Aug 29 05:48:54 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. 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",
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jul 08 09:59:40 UTC 2020
    - 4.2K bytes
    - Viewed (0)
  5. tests/associations_has_one_test.go

    	// Find
    	var user2 User
    	DB.Find(&user2, "id = ?", user.ID)
    	DB.Model(&user2).Association("Account").Find(&user2.Account)
    	CheckUser(t, user2, user)
    
    	// Count
    	AssertAssociationCount(t, user, "Account", 1, "")
    
    	// Append
    	account := Account{Number: "account-has-one-append"}
    
    	if err := DB.Model(&user2).Association("Account").Append(&account); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  6. tests/delete_test.go

    	}
    
    	if err := DB.Select(clause.Associations, "Pets.Toy").Delete(&user).Error; err != nil {
    		t.Fatalf("failed to delete user, got error %v", err)
    	}
    
    	for key, value := range map[string]int64{"Account": 1, "Pets": 2, "Toys": 4, "Company": 1, "Manager": 1, "Team": 1, "Languages": 0, "Friends": 0} {
    		if count := DB.Unscoped().Model(&user).Association(key).Count(); count != value {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Oct 10 07:03:34 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  7. compat/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>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. api/maven-api-toolchain/src/main/mdo/toolchains.mdo

              <name>toolchains</name>
              <version>1.0.0+</version>
              <description>The toolchain instance definition.</description>
              <association xml.itemsStyle="flat">
                <type>ToolchainModel</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
          </fields>
        </class>
        <class>
          <name>ToolchainModel</name>
          <superClass>TrackableBase</superClass>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Thu Aug 22 14:47:43 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  9. 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
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jul 14 06:55:54 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  10. api/maven-api-cli/src/main/mdo/core-extensions.mdo

              <description>A set of build extensions to use from this project.</description>
              <version>1.0.0+</version>
              <association xml.itemsStyle="flat">
                <type>CoreExtension</type>
                <multiplicity>*</multiplicity>
              </association>
            </field>
          </fields>
        </class>
        <class xml.tagName="extension">
          <name>CoreExtension</name>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Thu Oct 03 16:03:55 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top