- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 46 for company_ (0.14 sec)
-
tests/create_test.go
} } func TestFirstOrCreateWithPrimaryKey(t *testing.T) { company := Company{ID: 100, Name: "company100_with_primarykey"} DB.FirstOrCreate(&company) if company.ID != 100 { t.Errorf("invalid primary key after creating, got %v", company.ID) } companies := []Company{ {ID: 101, Name: "company101_with_primarykey"}, {ID: 102, Name: "company102_with_primarykey"}, } DB.Create(&companies)
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Jul 21 09:55:20 UTC 2025 - 26.8K bytes - Viewed (0) -
tests/generics_test.go
if result.Name == u.Name { if result.Company.Name != u.Company.Name { t.Fatalf("Preload user %v company should be %v, but got %+v", u.Name, u.Company.Name, result.Company.Name) } } else if result.Company.Name != "" { t.Fatalf("Preload other company should not loaded, user %v company expect %v but got %+v", u.Name, u.Company.Name, result.Company.Name) } }Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 02 14:09:18 UTC 2025 - 33.7K bytes - Viewed (0) -
tests/query_test.go
var results2 []User DB.Find(&results2, map[string]interface{}{"name": users[3].Name, "company_id": nil}) if len(results2) != 0 { t.Errorf("Search all records with inline map containing null value finding 0 records") } DB.Find(&results2, map[string]interface{}{"name": users[0].Name, "company_id": nil}) if len(results2) != 1 {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Jul 22 06:21:04 UTC 2025 - 51K bytes - Viewed (0) -
schema/naming_test.go
} joinTable2 := ns.JoinTableName("UserLanguage") if joinTable2 != "public.user_language" { t.Errorf("invalid join table generated, got %v", joinTable2) } tableName := ns.TableName("Company") if tableName != "public.company" { t.Errorf("invalid table name generated, got %v", tableName) } columdName := ns.ColumnName("", "NameCID") if columdName != "name_cid" {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue May 30 02:00:48 UTC 2023 - 7K bytes - Viewed (0) -
tests/associations_many2many_test.go
{Name: "TestMany2ManyDuplicateBelongsToAssociation-friend-1", Company: Company{ ID: 1, Name: "Test-company-1", }}, }} user2 := User{Name: "TestMany2ManyDuplicateBelongsToAssociation-2", Friends: []*User{ {Name: "TestMany2ManyDuplicateBelongsToAssociation-friend-2", Company: Company{ ID: 1, Name: "Test-company-1", }}, }} users := []*User{&user1, &user2} var err errorRegistered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0) -
tests/associations_test.go
user := *GetUser("TestAssociationError", Config{Pets: 2, Company: true, Account: true, Languages: 2}) DB.Create(&user) var user1 User DB.Preload("Company").Preload("Pets").Preload("Account").Preload("Languages").First(&user1) var emptyUser User var err error // belongs to err = DB.Model(&emptyUser).Association("Company").Delete(&user1.Company) AssertEqual(t, err, gorm.ErrPrimaryKeyRequired) // has manyRegistered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 12 04:33:27 UTC 2025 - 13.3K bytes - Viewed (0) -
tests/gaussdb_test.go
if DB.Dialector.Name() != "gaussdb" { t.Skip() } DB.Migrator().DropTable(&Company{}) DB.AutoMigrate(Company{}) if err := DB.Table("companies").Migrator().AlterColumn(CompanyNew{}, "name"); err != nil { t.Fatalf("failed to alter column from string to int, got error %v", err) } DB.AutoMigrate(Company{})
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Jul 21 02:46:58 UTC 2025 - 6.6K bytes - Viewed (0) -
tests/count_test.go
. "gorm.io/gorm/utils/tests" ) func TestCountWithGroup(t *testing.T) { DB.Create([]Company{ {Name: "company_count_group_a"}, {Name: "company_count_group_a"}, {Name: "company_count_group_a"}, {Name: "company_count_group_b"}, {Name: "company_count_group_c"}, }) var count1 int64 if err := DB.Model(&Company{}).Where("name = ?", "company_count_group_a").Group("name").Count(&count1).Error; err != nil {
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Sep 08 09:19:22 UTC 2025 - 6.8K bytes - Viewed (0) -
docs/en/data/sponsors_badge.yml
- cryptapi - xoflare - DropbaseHQ - VincentParedes - BLUE-DEVIL1134 - ObliviousAI - Doist - nihpo - armand-sauzay - databento-bot - databento - nanram22 - Flint-company - porter-dev - fern-api - ndimares - svixhq - Alek99 - codacy - zanfaruqui - scalar - bump-sh - andrew-propelauth - svix - zuplo-oss - zuplo - Kong
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Dec 01 20:06:57 UTC 2025 - 723 bytes - Viewed (0) -
schema/relationship_test.go
References: []Reference{ {"ID", "", "UserID", "Account", "", true}, }, }) checkStructRelation(t, &result, Relation{ Name: "Company", Type: schema.BelongsTo, Schema: "", FieldSchema: "Company", References: []Reference{ {"ID", "Company", "CompanyID", "", "", false}, }, }) } func TestSameForeignKey(t *testing.T) { type UserAux struct { gorm.Model Aux string UUID stringRegistered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 26.5K bytes - Viewed (0)