- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for company_id (0.6 sec)
-
tests/sql_builder_test.go
if !strings.Contains(str, "rgs.id = user.id") { t.Errorf("The second join condition is over written instead of combining") } if !strings.Contains(str, "`users`.`company_id` = `companies`.`id`") && !strings.Contains(str, "\"users\".\"company_id\" = \"companies\".\"id\"") { t.Errorf("The first join condition is over written instead of combining") } } func TestToSQL(t *testing.T) {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0) -
schema/schema_test.go
{Name: "Age", DBName: "age", BindNames: []string{"Age"}, DataType: schema.Uint, Size: 64}, {Name: "Birthday", DBName: "birthday", BindNames: []string{"Birthday"}, DataType: schema.Time}, {Name: "CompanyID", DBName: "company_id", BindNames: []string{"CompanyID"}, DataType: schema.Int, Size: 64}, {Name: "ManagerID", DBName: "manager_id", BindNames: []string{"ManagerID"}, DataType: schema.Uint, Size: 64},
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 12.9K bytes - Viewed (0) -
tests/table_test.go
dryDB := DB.Session(&gorm.Session{DryRun: true, QueryFields: true}) userQuery := "SELECT .*user.*id.*user.*created_at.*user.*updated_at.*user.*deleted_at.*user.*name.*user.*age" + ".*user.*birthday.*user.*company_id.*user.*manager_id.*user.*active.* " r := dryDB.Table("`user`").Find(&User{}).Statement if !regexp.MustCompile(userQuery + "FROM `user`").MatchString(r.Statement.SQL.String()) {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
tests/update_test.go
if err := DB.Create(&user).Error; err != nil { t.Errorf("failed to create user, got error: %v", err) } if err := DB.Model(&user).Update("name", DB.Model(&Company{}).Select("name").Where("companies.id = users.company_id")).Error; err != nil { t.Errorf("failed to update with sub query, got error %v", err) } var result User DB.First(&result, user.ID) if result.Name != user.Company.Name {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0) -
tests/joins_test.go
if result.ID != user.ID { t.Fatalf("result's id, %d, doesn't match user's id, %d", result.ID, user.ID) } // should find company if result.Company.ID != *user.CompanyID { t.Fatalf("result's id, %d, doesn't match user's company id, %d", result.Company.ID, *user.CompanyID) } } func TestJoinWithSoftDeleted(t *testing.T) { user := GetUser("TestJoinWithSoftDeletedUser", Config{Account: true, NamedPet: true}) DB.Create(&user)
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 15K bytes - Viewed (0) -
platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/catalog/TomlDependenciesExtensionIntegrationTest.groovy
com-company-libs-a = "com.company:a:1.0" com-companylibs-b = "com.companylibs:b:1.0" com-companyLibs-c = "com.companyLibs:c:1.0" com-company-d = "com.company:d:1.0" com-company-e = "com.company:e:1.0" [bundles] com-company-libs-bundle = ["com-company-d"] com-companylibs-bundle = ["com-company-e"] [plugins]
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue May 28 09:03:53 UTC 2024 - 33K bytes - Viewed (0) -
schema/relationship_test.go
}, }) 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 string } type User struct { gorm.Model
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 25.5K bytes - Viewed (0)