Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for _friend_ (0.04 sec)

  1. tests/helper_test.go

    		}
    	})
    
    	t.Run("Friends", func(t *testing.T) {
    		if len(user.Friends) != len(expect.Friends) {
    			t.Fatalf("Friends should equal, expect: %v, got %v", len(expect.Friends), len(user.Friends))
    		}
    
    		sort.Slice(user.Friends, func(i, j int) bool {
    			return user.Friends[i].ID > user.Friends[j].ID
    		})
    
    		sort.Slice(expect.Friends, func(i, j int) bool {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. tests/associations_many2many_test.go

    	// Append
    	friend := *GetUser("friend", Config{})
    
    	if err := DB.Model(&user2).Association("Friends").Append(&friend); err != nil {
    		t.Fatalf("Error happened when append account, got %v", err)
    	}
    
    	user.Friends = append(user.Friends, &friend)
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user, "Friends", 3, "AfterAppend")
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sat Jun 10 13:05:19 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  3. build.gradle.kts

          targetCompatibility = projectJavaVersion.toString()
        }
      }
    }
    
    subprojects {
      // From https://www.liutikas.net/2025/01/12/Kotlin-Library-Friends.html
    
        // Create configurations we can use to track friend libraries
      configurations {
        val friendsApi = register("friendsApi") {
          isCanBeResolved = true
          isCanBeConsumed = false
          isTransitive = true
        }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 11.5K bytes
    - Viewed (1)
  4. tests/create_test.go

    		*GetUser("bulk_5", Config{Account: false, Pets: 0, Toys: 3, Company: true, Manager: false, Team: 1, Languages: 3, Friends: 1}),
    		*GetUser("bulk_6", Config{Account: true, Pets: 4, Toys: 3, Company: false, Manager: true, Team: 1, Languages: 3, Friends: 0}),
    		*GetUser("bulk_7", Config{Account: true, Pets: 1, Toys: 3, Company: true, Manager: true, Team: 4, Languages: 3, Friends: 1}),
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Jul 21 09:55:20 UTC 2025
    - 26.8K bytes
    - Viewed (0)
  5. docs_src/python_types/tutorial011_py39.py

        id: int
        name: str = "John Doe"
        signup_ts: Union[datetime, None] = None
        friends: list[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 02 15:56:35 UTC 2023
    - 492 bytes
    - Viewed (0)
  6. docs_src/python_types/tutorial011_py310.py

        id: int
        name: str = "John Doe"
        signup_ts: datetime | None = None
        friends: list[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 02 15:56:35 UTC 2023
    - 461 bytes
    - Viewed (0)
  7. tests/generics_test.go

    	ctx := context.Background()
    	db := gorm.G[User](DB)
    
    	u := *GetUser("GenericsPreloads_1", Config{Company: true, Pets: 3, Friends: 7})
    	u2 := *GetUser("GenericsPreloads_2", Config{Company: true, Pets: 5, Friends: 5})
    	u3 := *GetUser("GenericsPreloads_3", Config{Company: true, Pets: 7, Friends: 3})
    	names := []string{u.Name, u2.Name, u3.Name}
    
    	db.CreateInBatches(ctx, &[]User{u3, u, u2}, 10)
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Nov 02 14:09:18 UTC 2025
    - 33.7K bytes
    - Viewed (0)
  8. tests/update_test.go

    	result.Friends = append(user.Friends, result.Friends...)
    
    	sort.Slice(result.Pets, func(i, j int) bool {
    		return result.Pets[i].ID < result.Pets[j].ID
    	})
    	sort.Slice(result.Team, func(i, j int) bool {
    		return result.Team[i].ID < result.Team[j].ID
    	})
    	sort.Slice(result.Friends, func(i, j int) bool {
    		return result.Friends[i].ID < result.Friends[j].ID
    	})
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Jul 21 02:46:58 UTC 2025
    - 30.4K bytes
    - Viewed (0)
  9. utils/tests/models.go

    // He works in a Company (belongs to), he has a Manager (belongs to - single-table), and also managed a Team (has many - single-table)
    // He speaks many languages (many to many) and has many friends (many to many - single-table)
    // His pet also has one Toy (has one - polymorphic)
    // NamedPet is a reference to a named `Pet` (has one)
    type User struct {
    	gorm.Model
    	Name      string
    	Age       uint
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Dec 15 08:36:08 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  10. tests/preload_test.go

    	DB.Create(&user)
    
    	DB.Preload("Team").Preload("Languages").Preload("Friends").First(&user, "name = ?", user.Name)
    
    	if r, err := json.Marshal(&user); err != nil {
    		t.Errorf("failed to marshal users, got error %v", err)
    	} else if !regexp.MustCompile(`"Team":\[\],"Languages":\[\],"Friends":\[\]`).MatchString(string(r)) {
    		t.Errorf("json marshal is not empty slice, got %v", string(r))
    	}
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Wed Jun 12 10:00:47 UTC 2024
    - 15.9K bytes
    - Viewed (0)
Back to top